diff --git a/source b/source index 62c6afe738d..60954ab9907 100644 --- a/source +++ b/source @@ -9171,7 +9171,7 @@ partial interface Document { readonly attribute HTMLOrSVGScriptElement? currentScript; // classic scripts in a document tree only // dynamic markup insertion - [CEReactions] Document open(optional DOMString type, optional DOMString replace = ""); // type is ignored + [CEReactions] Document open(optional DOMString type, optional DOMString replace); // type and replace are ignored WindowProxy open(USVString url, DOMString name, DOMString features); [CEReactions] void close(); [CEReactions] void write(DOMString... text); @@ -76914,14 +76914,12 @@ dictionary DragEventInit : MouseEventInit {
In general, there is a 1-to-1 mapping from the Window
object to the
Document
object, as long as the Document
object has a browsing context. There are two exceptions. First, a
+ data-x="concept-document-bc">browsing context. There is one exception. A
Window
can be reused for the presentation of a second Document
in the
same browsing context, such that the mapping is then 1-to-2. This occurs when a
browsing context is navigated from the initial
- about:blank
Document
to another, with replacement enabled.
- Second, a Document
can end up being reused for several Window
objects
- when the document.open()
method is used, such that the
- mapping is then many-to-1.
about:blank
Document
to another, with replacement
+ enabled.
A Document
does not necessarily have a browsing context associated with it. In particular, data
@@ -79476,6 +79474,7 @@ interface BarProp {
the Document
's URL to
"about:blank
". Therefore the origin is assigned when the
Document
is created.
open
( [ type [, replace ] ] )open
()Causes the Document
to be replaced in-place, as if it was a new
Document
object, but reusing the previous object, which is then returned.
The resulting Document
has an HTML parser associated with it, which can be given
- data to parse using document.write()
. (The
- type argument is ignored.)
If the replace argument is present and has the value "replace
", the existing entries in the session history for the
- Document
object are removed.
document.write()
.
The method has no effect if the Document
is still being parsed.
The document open steps, given a document and replaceInput, - are as follows:
+The document open steps, given a document, are as follows:
If document is an XML document, then throw
@@ -90615,21 +90608,6 @@ document.body.appendChild(frame)
handler while the Document
is being unloaded.
Let replace be false. - -
If replaceInput is an ASCII case-insensitive match for "replace
", then set replace to true.
Otherwise, if document's browsing context's session
- history contains only one Document
object, and that was the
- about:blank
Document
created when document's browsing
- context was created, and that
- Document
object has never had the unload a document algorithm invoked
- on it (e.g., by a previous call to document.open()
),
- then set replace to true.
Set document's salvageable state to false.
Replace all with null within document, without firing any mutation events.
Call the JavaScript InitializeHostDefinedRealm() abstract operation @@ -90721,30 +90700,6 @@ document.body.appendChild(frame)
Set the current document readiness of document to "loading
".
Remove any tasks queued by the history traversal
- task source that are associated with any Document
objects in the
- top-level browsing context's document family.
Remove all the entries in the browsing context's session history - after the current entry. If the current entry is the last entry in the - session history, then no entries are removed.
- -This doesn't necessarily have to affect the user - agent's user interface.
-Remove any earlier entries whose Document
object is
- document.
If replace is false, then add a new entry, just before the last entry,
- and associate with the new entry the text that was parsed by the previous parser associated with
- document, as well as the state of document at the start of these steps.
- This allows the user to step backwards in the session history to see the page before it was blown
- away by the document.open()
call. This new entry does not
- have a Document
object, so a new one will be created if the session history is
- traversed to that entry.
Set document's fired unload flag to false. (It could have been set to true during the unload step above.)
When invoked with two arguments or fewer, the document.open(type, replace)
method must
- return the result of running the document open steps with this Document
- object and replace.
+ data-x="dom-document-open">document.open(type) method must return the result of
+ running the document open steps with this Document
object.
The type argument is ignored. Also, the document.open()
method does not affect whether a