Sketch WebView explorations
After Ale’s posting about different approaches to create Sketch dialogues I have investigated in WebViews.
The communication with the WebView is not possible when the panel with the WebView is created. The communication is possible from the second script run - the reference to the WebView is persistently saved.
webView:didClearWindowObject:forFrame: -> JS function
webView:didFinishLoadForFrame: -> JS function
WebViewLoadDelegate.prototype.webView_didFinishLoadForFrame. I set the delegate on the WebView with
Question: How to implement a WebFrameLoadDelegate in CocoaScript?
Question: How can a script continue to run without blocking other threads / Sketch?
To solve the
Looking forward to be able to work with HTML pages from Sketch.