How could you stop webview page from continuing to proceed to next link on renderer?


#1

how could you stop webview page from continuing to proceed to next link on renderer?


#2

What causes it to proceed?


#3

Well, I’m using the ‘will-navigate’ method on renderer, then I add e.preventDefaults() but it still proceeds to the next link.


#4

According to the docs, it’s event.preventDefault().


#5

sorry. Its just a type. I’m also using e.preventDefault() but it does not work. I also tried using webview.stop() but when i logged ‘webview.stop()’ it returns undefined. Any ideas how to stop links from proceeding?


#6

Apparently the behavior for will-navigate in a webview is different from the behavior in webContents, and webview-based will-navigate events don’t offer the ability to prevent navigation.

You should be more careful when you’re asking for help with code problems.