this.#webview=this.#browser.createWebview({
url: _descriptor.url,
html: _descriptor.html,
navigationHandler: (_url)=>{
console.log('navigationHandler')
console.log(_url)
return false
},
})
This does nothing to intercept navigation by pressing F5, clicking a link, using window.open() from within the webview, using window.location=url from within the webview, or using webview.loadUrl() from the Node process.
this.#webview.on('navigation',_=>{
console.log('navigation',_)
return false
})
This does capture all of those navigation events and displays them, but the navigation can't be canceled from here.
This is using the webview.win32-x64-msvc.node binding.
Thanks, and I appreciate all of the recent work on this package.
-Ryan
this.#webview=this.#browser.createWebview({ url: _descriptor.url, html: _descriptor.html, navigationHandler: (_url)=>{ console.log('navigationHandler') console.log(_url) return false }, })This does nothing to intercept navigation by pressing F5, clicking a link, using window.open() from within the webview, using window.location=url from within the webview, or using webview.loadUrl() from the Node process.
this.#webview.on('navigation',_=>{ console.log('navigation',_) return false })This does capture all of those navigation events and displays them, but the navigation can't be canceled from here.
This is using the webview.win32-x64-msvc.node binding.
Thanks, and I appreciate all of the recent work on this package.
-Ryan