5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 15:00:21 +08:00

fix: #658 polyfill window.external for webkit2gtk > 2.32 (#659)

This commit is contained in:
Florian Didron 2021-04-09 12:44:21 +09:00 committed by GitHub
parent 163c0d9e67
commit 87df51feeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 6 deletions

File diff suppressed because one or more lines are too long

View File

@ -21,6 +21,14 @@ import * as Store from './store';
window.wails = window.wails || {};
window.backend = {};
// On webkit2gtk >= 2.32, the external object is not passed
// to the window context,
window.external = window.external || {
invoke: function(x) {
window.webkit.messageHandlers.external.postMessage(x);
}
};
// Setup internal calls
var internal = {
NewBinding,