Define srcdoc documents as matching about:srcdoc URL #9534
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Before this PR, the spec defined "an iframe srcdoc document" as being solely constructed from the contents of an iframe's
srcdoc
content attribute. This mean that what I'm calling "nontraditional srcdoc documents" technically didn't have the same behavior required by any part of the spec that defined behavior specifically for "an iframe srcdoc document". Nontraditional srcdoc documents can be constructed by eitherdocument.open()
or navigating to ajavascript:
URL inside of anabout:srcdoc
iframe.This PR removes the distinction between nontraditional srcdoc documents and the classic "iframe srcdoc documents" by introducing the "matches about:srcdoc" concept for URLs, and defining "an iframe srcdoc document" as a thin alias over this concept. This proposal was described by #9514 (comment).
Additionally, this new concept ensures that
about:srcdoc#foo
documents (modified viahistory.replaceState(null, '', 'about:srcdoc#foo')
) are also counted as normal srcdoc documents, although Chromium and Firefox currently have issues with this (see bugs below).(See WHATWG Working Mode: Changes for more details.)
Closes #9514.
/iframe-embed-object.html ( diff )
/urls-and-fetching.html ( diff )