mirror of
https://github.com/Stremio/stremio-shell-ng.git
synced 2026-03-11 21:27:06 +00:00
Do not initShellComm in frame
This commit is contained in:
parent
fd970689ba
commit
cc906ddd2b
1 changed files with 2 additions and 0 deletions
|
|
@ -94,9 +94,11 @@ impl PartialUi for WebView {
|
|||
webview
|
||||
.add_script_to_execute_on_document_created(
|
||||
r##"
|
||||
try{if(window.self === window.top) {
|
||||
window.qt={webChannelTransport:{send:window.chrome.webview.postMessage}};
|
||||
window.chrome.webview.addEventListener('message',ev=>window.qt.webChannelTransport.onmessage(ev));
|
||||
window.onload=()=>{try{initShellComm();}catch(e){window.chrome.webview.postMessage('{"id":1,"args":["app-error","'+e.message+'"]}')}};
|
||||
}}catch(e){}
|
||||
"##,
|
||||
|_| Ok(()),
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in a new issue