Re: [whatwg/dom] Add "mode locked" flag to Document, plus an algorithm to use it (#989)

@annevk commented on this pull request.

How often can this state change? Can it only change once from no-quirks to either quirks or limited-quirks? An alternative might be having an "initial-no-quirks" state, but perhaps that requires too many changes elsewhere.

> @@ -4860,6 +4862,14 @@ null if <var>event</var>'s {{Event/type}} attribute value is "<code>load</code>"
 <a>document</a> does not have a <a for=Document>browsing context</a>; otherwise the
 <a>document</a>'s <a>relevant global object</a>.
 
+<p>A <a>document</a>'s <dfn export id=concept-document-set-the-mode>set the mode</dfn> algorithm,
+given a <var>new mode</var>, performs the following steps:
+
+<ol>
+ <li><p>If <a>this</a>'s <a for=Document>mode locked</a> is true, return.

then return*

Add a newline here as well to separate from the following `<li>`.

> @@ -4860,6 +4862,14 @@ null if <var>event</var>'s {{Event/type}} attribute value is "<code>load</code>"
 <a>document</a> does not have a <a for=Document>browsing context</a>; otherwise the
 <a>document</a>'s <a>relevant global object</a>.
 
+<p>A <a>document</a>'s <dfn export id=concept-document-set-the-mode>set the mode</dfn> algorithm,

It might be slightly clearer to redo this as

> To set the document mode, given a document _document_ and a string _newMode_, ...

No need to add the ID for new `<dfn>`s. One will be generated.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/pull/989#pullrequestreview-682574039

Received on Monday, 14 June 2021 07:14:26 UTC