-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Use "matches about:blank" and "matches about:srcdoc" in more places #9488
Comments
I'm quite sure they should use "matches about:blank". Adding WPTs at the same time we fix this would be good. #816 tracks the missing definition. Probably at this point HTML should just define it? |
I made #9558 to handle the "matches about:blank" side of this issue, but after evaluating whether we should use "matches about:srcdoc" more often, I've tentatively determined the answer is no. Consider the following places where "about:srcdoc" definition:
If we agree on that, then I think once #9558 lands we can close this. |
Are you sure you cannot #navigate to |
How does it work per spec? We wouldn't hit the srcdoc case in https://html.spec.whatwg.org/#attempt-to-populate-the-history-entry's-document step 5.1, right? I think we'd end up in https://fetch.spec.whatwg.org/#concept-scheme-fetch and get a network error and fail the navigation. If that's correct, maybe you still have a point though since the document state would still be around, and maybe its "origin" should contain the parent origin for the srcdoc case? Not sure |
I meant that it makes it to the navigate algorithm. Then, what path it goes down from there, depends on our decision to use "is" vs. "matches". If we use "is", we get a network error. (Like Firefox??) Whereas if we use "matches", I think the algorithm blows up because there's no documentResource? And neither of those matches Chrome, from what I can tell, and I haven't tested Safari. |
After some discussion on Matrix, it seems I was confused about what would happen if we use "matches". We should probably continue to us "is" because there's a documentResource iff the URL is exactly It would be ideal to find or add some web platform tests for the navigation-to- |
From a quick look I'm not finding any tests that assert |
Right now step 19.5 in https://html.spec.whatwg.org/#navigate and step 2 in https://html.spec.whatwg.org/#fallback-base-url directly compare a url to
about:blank
. There are two interesting points here:about:blank
but it doesn't (see https://html.spec.whatwg.org/#about:blank)Maybe these two instances about should use it as well? I've looked through the other references of
about:blank
and I think they're fine, so these two are the only ones that need to be evaluated. And a couple of tests wouldn't hurt.In this bug we should also consider the "matches about:srcdoc" definition that was recently added in #9534.
The text was updated successfully, but these errors were encountered: