- allow windows to close on MacOS 10.15 (Thanks @robintindale)
- fix production builds using URLs containing spaces (Thanks @robintindale)
- Emit
uncaughtException
event if available (Sketch >=58) instead of throwing an error if there is an event listener
- Correctly load file URLs when prepended with
file://
(Thanks @huw)
- Fix the
webview.focus()
andwebview.blur()
methods not working - Fix the webview getting stuck to cursor on draggable area (Thanks @xsfour)
- Fix the y coordinate of the first event of
acceptFirstClick
- Fix
webContents.executeJavaScript
when the script contains some escaped double quotes
- Fix
remote.sendToWebview
when the inspector was opened (Thanks @ig-robstoffers)
- Fix
webContents.executeJavaScript
- Clear the webview context when closing the webview.
- Fix
sendToWebview
andfromPanel
when the vibrancy option is set.
- Fix hiding the background of the webview. This in turn fixes setting the vibrancy option.
-
Add
data-app-region
to be able to drag a div to move the window. -
executeJavascript
changed a bit: if the result of the executed code is a promise the callback result will be the resolved value of the promise. We recommend that you use the returned Promise to handle code that results in a Promise.contents .executeJavaScript( 'fetch("https://jsonplaceholder.typicode.com/users/1").then(resp => resp.json())', true ) .then(result => { console.log(result) // Will be the JSON object from the fetch call })
-
Fix bounds methods to handle inverted y as well as the initial y position of the window.
- Fix remotely executing javascript on a webview.
- Fix events dispatching to the wrong event emitter.
- Fix a bug in the 'will-navigate' event.
- Fix a bug preventing events to be triggered (introduced in v2.1.3).
- Make sure that
webContents.executeJavascript
is executed after the webview is loaded. - Wrap event handlers in try/catch to log the error (and avoid crashing Sketch).
- Fix a crash when loading an https resource.
- Enable developer tools by setting
options.webPreferences.devTools
to true.
- Add support for showing the webview as a modal (aka sheet) by setting
options.modal
totrue
.
- Fix the loading of css/js assets from a local web page
- The webview is now backed by
WKWebview
. - Instead of importing
sketch-module-web-view/client
, you now communicate with the plugin usingwindow.postMessage
.