-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Test document.URL of <iframe src="javascript:..."> #14316
Conversation
The document.URL should be about:blank.
Oooh, it's not a silly test: it shows a difference in behavior between Firefox and Chrome! https://staging.wpt.fyi/results/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm?product=firefox-65.0a1-linux-18.04%405db2938a51&product=firefox-65.0a1-linux-18.04%40878c3ea597&diff It turns out Hixie knew about this difference: whatwg/html@d52ebc243#diff-36cd38f49b9afa08222c0dc9ebfe35ebR74223. |
... I may not know how to read the WPT results. |
This is very new, a WIP. If something doesn't make sense, then @lukebjerring to the rescue :) |
The "URL that was originally to be fetched" isn't clear about which URL that actually was. This makes it clear that we use the request's current URL when available, or the response's URL when not. For javascript: URLs, this fixes them to match 2/3 browser behavior. 6440cca regressed the algorithm by deleting the actual usage site of the address variable. This change reintroduces the use of address, although in a simpler way, by appending address to the request's URL list, instead of using the "override URL" concept which was removed. Fixes #3953. Closes #1565 by preserving the special case; discussions there and in https://bugzilla.mozilla.org/show_bug.cgi?id=1281375#c7 indicate that the special case is more web-compatible. Tests: * https://github.com/web-platform-tests/wpt/blob/7ed525acfb4133c1177fdb1ff8477e2a6469e6b4/html/browsers/history/the-location-interface/location_hash.html#L24 * https://github.com/web-platform-tests/wpt/blob/7ed525acfb4133c1177fdb1ff8477e2a6469e6b4/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm * web-platform-tests/wpt#14288 * web-platform-tests/wpt#14316
The "URL that was originally to be fetched" isn't clear about which URL that actually was. This makes it clear that we use the request's current URL when available, or the response's URL when not. For javascript: URLs, this fixes them to match 2/3 browser behavior. 6440cca regressed the algorithm by deleting the actual usage site of the address variable. This change reintroduces the use of address, although in a simpler way, by appending address to the request's URL list, instead of using the "override URL" concept which was removed. Fixes whatwg#3953. Closes whatwg#1565 by preserving the special case; discussions there and in https://bugzilla.mozilla.org/show_bug.cgi?id=1281375#c7 indicate that the special case is more web-compatible. Tests: * https://github.com/web-platform-tests/wpt/blob/7ed525acfb4133c1177fdb1ff8477e2a6469e6b4/html/browsers/history/the-location-interface/location_hash.html#L24 * https://github.com/web-platform-tests/wpt/blob/7ed525acfb4133c1177fdb1ff8477e2a6469e6b4/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm * web-platform-tests/wpt#14288 * web-platform-tests/wpt#14316
The "URL that was originally to be fetched" isn't clear about which URL that actually was. This makes it clear that we use the request's current URL when available, or the response's URL when not. For javascript: URLs, this fixes them to match 2/3 browser behavior. 6440cca regressed the algorithm by deleting the actual usage site of the address variable. This change reintroduces the use of address, although in a simpler way, by appending address to the request's URL list, instead of using the "override URL" concept which was removed. Fixes whatwg#3953. Closes whatwg#1565 by preserving the special case; discussions there and in https://bugzilla.mozilla.org/show_bug.cgi?id=1281375#c7 indicate that the special case is more web-compatible. Tests: * https://github.com/web-platform-tests/wpt/blob/7ed525acfb4133c1177fdb1ff8477e2a6469e6b4/html/browsers/history/the-location-interface/location_hash.html#L24 * https://github.com/web-platform-tests/wpt/blob/7ed525acfb4133c1177fdb1ff8477e2a6469e6b4/html/semantics/embedded-content/the-iframe-element/iframe_javascript_url_01.htm * web-platform-tests/wpt#14288 * web-platform-tests/wpt#14316
The document.URL should be about:blank.
Related to whatwg/html#4205. Feel free to tell me that this is a silly test or covered elsewhere. :)