You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a document is not associated with a frame, does it still need to have a "container" policy? The only example for such documents I can think of are those returned by DOMParser.parseFromString().
For example, document-stream-insertion (soon to be document-write) is used to block calls to document.write. If the document creates a document from parsing string, should it be able to use the API?
The text was updated successfully, but these errors were encountered:
Both document.open() and document.write[ln]() will return early in cases where the document doesn't have a browsing context (_frame in Blink), because they can't be the active document in such cases.
(There's many ways to get such documents btw, new Document(), xhr.responseXML, etc.)
Thanks for responding and sorry for the delay. I did test this locally on Chrome and FireFox:
let doc = (new DOMParser()).parseFromString("<body></body>", "text/html");
doc.write("foo");
to find out that apparently blink does not actually follow the specs here. As you mentioned above, according to step 3 in the specs document.write is expected to return early if the document is not an "active" document (which is what you suggested above). I will file a bug for chrome.
When a document is not associated with a frame, does it still need to have a "container" policy? The only example for such documents I can think of are those returned by
DOMParser.parseFromString()
.For example,
document-stream-insertion
(soon to bedocument-write
) is used to block calls todocument.write
. If the document creates a document from parsing string, should it be able to use the API?The text was updated successfully, but these errors were encountered: