@@ -73576,21 +73576,11 @@ body { display:none }
73576
73576
73577
73577
73578
73578
73579
- <h4>Making entire documents editable: the <code data-x="dom-document-designMode">designMode</code>
73580
- IDL attribute</h4>
73581
-
73582
- <div w-nodev>
73583
-
73584
- <p>Documents have a <dfn id="designMode"
73585
- data-x="dom-document-designMode"><code>designMode</code></dfn>, which can be either enabled or
73586
- disabled.</p>
73587
-
73588
- </div>
73579
+ <h4 id="making-entire-documents-editable:-the-designmode-idl-attribute">Making entire documents
73580
+ editable: the <code data-x="dom-document-designMode">designMode</code> getter and setter</h4>
73589
73581
73590
73582
<dl class="domintro">
73591
-
73592
73583
<dt><var>document</var> . <code subdfn data-x="dom-document-designMode">designMode</code> [ = <var>value</var> ]</dt>
73593
-
73594
73584
<dd>
73595
73585
<p>Returns "<code data-x="">on</code>" if the document is editable, and "<code
73596
73586
data-x="">off</code>" if it isn't.</p>
@@ -73602,28 +73592,37 @@ body { display:none }
73602
73592
73603
73593
<div w-nodev>
73604
73594
73605
- <p>The <code data-x="dom-document-designMode">designMode</code> IDL attribute on the
73606
- <code>Document</code> object takes two values, "<code data-x="">on</code>" and "<code
73607
- data-x="">off</code>". On setting, the new value must be compared in an <span>ASCII
73608
- case-insensitive</span> manner to these two values; if it matches the "<code data-x="">on</code>"
73609
- value, then <code data-x="dom-document-designMode">designMode</code> must be enabled, and if it
73610
- matches the "<code data-x="">off</code>" value, then <code
73611
- data-x="dom-document-designMode">designMode</code> must be disabled. Other values must be
73612
- ignored.</p>
73595
+ <p><code>Document</code> objects have an associated <dfn>design mode enabled</dfn>, which is a
73596
+ boolean. It is initially false.</p>
73613
73597
73614
- <p>On getting, if <code data-x="dom-document-designMode">designMode</code> is enabled, the IDL
73615
- attribute must return the value "<code data-x="">on</code>"; otherwise it is disabled, and the
73616
- attribute must return the value "<code data-x="">off</code>".</p>
73598
+ <p>The <dfn id="designMode"> <code data-x="dom-document-designMode">designMode</code></dfn> getter
73599
+ steps are to return "<code data-x="">on</code>" if <span>this</span>'s <span>design mode
73600
+ enabled</span> is true; otherwise "<code data-x="">off</code>".</p>
73617
73601
73618
- <p>The last state set must persist until the document is destroyed or the state is changed.
73619
- Initially, documents must have their <code data-x="dom-document-designMode">designMode</code>
73620
- disabled.</p>
73602
+ <p>The <code data-x="dom-document-designMode">designMode</code> setter steps are:</p>
73621
73603
73622
- <p>When the <code data-x="dom-document-designMode">designMode</code> changes from being disabled to
73623
- being enabled, the user agent must <span>immediately</span> reset the document's <span>active range</span>'s
73624
- start and end boundary points to be at the start of the <code>Document</code> and then run the
73625
- <span>focusing steps</span> for the <span>document element</span> of the <code>Document</code>, if
73626
- non-null.</p>
73604
+ <ol>
73605
+ <li><p>Let <var>value</var> be the given value, converted to <span>ASCII
73606
+ lowercase</span>.</p></li>
73607
+
73608
+ <li>
73609
+ <p>If <var>value</var> is "<code data-x="">on</code>" and <span>this</span>'s <span>design mode
73610
+ enabled</span> is false, then:</p>
73611
+
73612
+ <ol>
73613
+ <li><p>Set <span>this</span>'s <span>design mode enabled</span> to true.</p></li>
73614
+
73615
+ <li><p>Reset <span>this</span>'s <span>active range</span>'s start and end boundary points to
73616
+ be at the start of <span>this</span>.</p></li>
73617
+
73618
+ <li><p>Run the <span>focusing steps</span> for <span>this</span>'s <span>document
73619
+ element</span>, if non-null.</p></li>
73620
+ </ol>
73621
+ </li>
73622
+
73623
+ <li><p>If <var>value</var> is "<code data-x="">off</code>", then set <span>this</span>'s
73624
+ <span>design mode enabled</span> to false.</p></li>
73625
+ </ol>
73627
73626
73628
73627
</div>
73629
73628
@@ -73665,8 +73664,8 @@ body { display:none }
73665
73664
<p>An <dfn data-export="">editing host</dfn> is either an <span data-x="HTML elements">HTML
73666
73665
element</span> with its <code data-x="attr-contenteditable">contenteditable</code> attribute in
73667
73666
the <i>true</i> state, or a <span data-x="concept-tree-child">child</span> <span data-x="HTML
73668
- elements">HTML element</span> of a <code>Document</code> with <code
73669
- data-x="dom-document-designMode">designMode</code> enabled .</p>
73667
+ elements">HTML element</span> of a <code>Document</code> whose <span>design mode enabled</span> is
73668
+ true .</p>
73670
73669
73671
73670
<p>The definition of the terms <dfn
73672
73671
data-x-href="https://w3c.github.io/editing/execCommand.html#active-range">active range</dfn>, <dfn
0 commit comments