New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add will-frame-navigate
event
#34418
feat: add will-frame-navigate
event
#34418
Conversation
c09f15e
to
26f1ceb
Compare
Is there a possibility that this PR will be reviewed / merged soon? |
I'm actually working on updating my branch this week. The |
26f1ceb
to
f25f7b5
Compare
API LGTM |
Release Notes Persisted
|
I was unable to backport this PR to "24-x-y" cleanly; |
Thanks everyone :-) |
Description of Change
This PR adds a
will-frame-navigate
event towebContents
. Unlikewill-navigate
which only fires for the mainFrame, this event fires for any frames within thewebContents
. Similarly, awill-frame-navigate
attribute is added to the<webview>
tag, which is called whenever that webview or any of its child frames attempts to navigate.Because
will-navigate
andwill-frame-navigate
are so similar, I mostly copied the tests fromwill-navigate
and updated them to test the correct event. I also added some additional tests forwill-frame-navigate
to verify the correct behavior when a subframe navigates.Closes #7097
cc @samuelmaddock who has discussed adding this event in the past
Checklist
npm test
passesRelease Notes
Notes: Added a
will-frame-navigate
event towebContents
and the<webview>
tag, which fires whenever any frame within the frame hierarchy attempts to navigate.