Skip to content
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

Editorial: Attempt to fix the navigation scope monkey patching. #700

Closed
wants to merge 1 commit into from

Conversation

mgiuca
Copy link
Collaborator

@mgiuca mgiuca commented Jul 5, 2018

The previous text did not match the way the HTML navigate algorithm works. The new text aligns with the wording in the HTML algorithm, while preserving the currently specified behaviour.

The second part (attempting to capture redirects off-scope) is a little vague, but should capture the intention.


Preview | Diff

@mgiuca mgiuca requested a review from marcoscaceres July 5, 2018 05:17
@mgiuca
Copy link
Collaborator Author

mgiuca commented Jul 5, 2018

Note that this change is obsoleted by #701 (but that is a breaking change, whereas this is just editorial). I uploaded this to show what changes we'd need to make if we don't go with #701. We should land one or the other.

The problem is that the old monkey patch text refers to things that no longer exist in the HTML spec (e.g., the "handle redirects" step). Another problem is that the old text said to run navigate "with exceptions enabled", which doesn't make sense to me, since as far as I can tell the difference between exceptions enabled, and not, is that exceptions enabled = MUST terminate the navigation, whereas no exceptions enabled = MAY open in another top-level browsing context. It seems like the latter is exactly what we want.

The first part of the new text is quite formal and I think is a suitable text that could be added to HTML spec to cancel the navigation early if the URL is out of scope.

However, the second part is a lot more hand-wavey, because I just couldn't get my head around the whole navigate algorithm in HTML, and figure out a place to insert logic to say "if during navigation, we try to redirect to a URL that is out of scope, cancel the navigation and possibly open it in a new top-level browsing context." So I just added a generic rule.

Note that going to #701 is probably actually much simpler, though it requires negotiations since we'd be breaking existing behaviour.

The previous text did not match the way the HTML navigate algorithm works. The
new text aligns with the wording in the HTML algorithm, while preserving the
currently specified behaviour.

The second part (attempting to capture redirects off-scope) is a little vague,
but should capture the intention.
@mgiuca mgiuca force-pushed the navigation-scope-fix-logic branch from 5847cf6 to 7a7be71 Compare July 9, 2018 06:58
@mgiuca mgiuca closed this Sep 25, 2018
@mgiuca mgiuca deleted the navigation-scope-fix-logic branch October 9, 2018 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant