Skip to content

"navigationHandler" option for browserwindow.createWebview() doesn't seem to work (webview.win32-x64-msvc) #51

Description

@RyanHanekamp
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions