Skip to content

EventListener "will-navigate" doesn't produce a function. #12096

@jakubkarbowski

Description

@jakubkarbowski
  • Electron version: 1.6.12 (electron-prebuilt-compile)
  • Operating system: Windows 10

Expected behavior

I am writing application in react. I want to create eventListener, which will send by ipcRenderer url of first webview, to another. Also some links should be blocked. I tried a lot of evens, but finally ended with 'will-navigate' and event.preventDefault().

Actual behavior

Will-navigate doesn't work at all. It doesn't display even console logs. I checked other events. F.g did-navigate or did-navigate-in-page and from these events I received respones.

How to reproduce

ReactDOM.findDOMNode(this).addEventListener('did-navigate-in-page',(event) =>{ console.log("did-navigate-in-page")});

ReactDOM.findDOMNode(this).addEventListener('did-navigate',(event, url) =>{ console.log("did-navigate")});

ReactDOM.findDOMNode(this).addEventListener('will-navigate',(event, url) =>{ console.log("will-navigate")})

And responses are:

did-navigate-in-page 
did-navigate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions