-
Notifications
You must be signed in to change notification settings - Fork 15k
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
fix: emit will-navigate for sandboxed contents #22188
Conversation
NB. this approach was previously attempted here #20050, but wasn't accepted because of an assertion that Here's a test fiddle: https://gist.github.com/f4dfb4cd13e1a433b79a118a94a98965 Try watching |
To add some notes on this mechanism:
/cc @zcbenz incase I missed a scenario. |
}) | ||
w.loadFile(path.join(fixtures, 'pages', 'will-navigate.html')) | ||
for (const sandbox of [false, true]) { | ||
describe(`navigation events${sandbox ? ' with sandbox' : ''}`, () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test for will-navigate
in the case when navigating from non-file scheme to file scheme ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems that results in "Not allowed to load local resource: file://..."
, in both the sandbox and non-sandbox situations, with this patch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did a few tests with the change and it works fine with old problematic scenarios.
Release Notes Persisted
|
I was unable to backport this PR to "7-1-x" cleanly; |
I was unable to backport this PR to "8-x-y" cleanly; |
I have automatically backported this PR to "9-x-y", please check out #22327 |
Description of Change
Fixes #8841.
Checklist
npm test
passesRelease Notes
Notes: Fixed "will-navigate" event not being emitted for sandboxed contents.