Forum Archive

WebView newbie

polymerchm

Any guidance on how to get a "hyperlink" into a webview that interact with the script that generated it. OR, can you add a "close' button to the webview?

TutorialDoctor

You could put the webview inside of a Custom View and add a button inside of that that closes them both. I could make an example if you want me to.

cvp

See this example

JonB

for having the webview interact with the script, you need a delegate.

https://forum.omz-software.com/topic/1804/debugging-in-javascript-in-pythonista

is an example, more focused on a working console and js debugging, but the same idea applies, A regular button with an href that points to your custom url scheme which you then capture in the delegate.