@@ -3747,7 +3747,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
3747
3747
<li><dfn data-x="concept-css-style-sheet-media" data-x-href="https://drafts.csswg.org/cssom/#concept-css-style-sheet-media">media</dfn></li>
3748
3748
<li><dfn data-x="concept-css-style-sheet-title" data-x-href="https://drafts.csswg.org/cssom/#concept-css-style-sheet-title">title</dfn></li>
3749
3749
<li><dfn data-x="concept-css-style-sheet-alternate-flag" data-x-href="https://drafts.csswg.org/cssom/#concept-css-style-sheet-alternate-flag">alternate flag</dfn></li>
3750
- <li><dfn data-x="concept-css-style-sheet-disabeld -flag" data-x-href="https://drafts.csswg.org/cssom/#concept-css-style-sheet-disabled-flag">disabled flag</dfn></li>
3750
+ <li><dfn data-x="concept-css-style-sheet-disabled -flag" data-x-href="https://drafts.csswg.org/cssom/#concept-css-style-sheet-disabled-flag">disabled flag</dfn></li>
3751
3751
<li><dfn data-x="concept-css-style-sheet-CSS-rules" data-x-href="https://drafts.csswg.org/cssom/#concept-css-style-sheet-css-rules">CSS rules</dfn></li>
3752
3752
<li><dfn data-x="concept-css-style-sheet-origin-clean-flag" data-x-href="https://drafts.csswg.org/cssom/#concept-css-style-sheet-origin-clean-flag">origin-clean flag</dfn></li>
3753
3753
</ul>
@@ -15658,6 +15658,7 @@ people expect to have work and what is necessary.
15658
15658
interface <dfn interface>HTMLStyleElement</dfn> : <span>HTMLElement</span> {
15659
15659
[<span>HTMLConstructor</span>] constructor();
15660
15660
15661
+ attribute boolean <span data-x="dom-style-disabled">disabled</span>;
15661
15662
[<span>CEReactions</span>] attribute DOMString <span data-x="dom-style-media">media</span>;
15662
15663
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-style-blocking">blocking</span>;
15663
15664
@@ -15673,6 +15674,42 @@ interface <dfn interface>HTMLStyleElement</dfn> : <span>HTMLElement</span> {
15673
15674
model. The element does not <span data-x="represents">represent</span> content for the
15674
15675
user.</p>
15675
15676
15677
+ <p>The <dfn attribute for="HTMLStyleElement"><code
15678
+ data-x="dom-style-disabled">disabled</code></dfn> getter steps are:</p>
15679
+
15680
+ <ol>
15681
+ <li><p>If <span>this</span> does not have an <span>associated CSS style sheet</span>, return
15682
+ false.</p></li>
15683
+
15684
+ <li><p>If <span>this</span>'s <span>associated CSS style sheet</span>'s <span
15685
+ data-x="concept-css-style-sheet-disabled-flag">disabled flag</span> is set, return true.</p></li>
15686
+
15687
+ <li><p>Return false.</p></li>
15688
+ </ol>
15689
+
15690
+ <p>The <code data-x="dom-style-disabled">disabled</code> setter steps are:</p>
15691
+
15692
+ <ol>
15693
+ <li><p>If <span>this</span> does not have an <span>associated CSS style sheet</span>,
15694
+ return.</p></li>
15695
+
15696
+ <li><p>If the given value is true, set <span>this</span>'s <span>associated CSS style
15697
+ sheet</span>'s <span data-x="concept-css-style-sheet-disabled-flag">disabled flag</span>.
15698
+ Otherwise, unset <span>this</span>'s <span>associated CSS style sheet</span>'s <span
15699
+ data-x="concept-css-style-sheet-disabled-flag">disabled flag</span>.</p></li>
15700
+ </ol>
15701
+
15702
+ <div class="example">
15703
+ <p>Importantly, <code data-x="dom-style-disabled">disabled</code> attribute assignments only take
15704
+ effect when the <code>style</code> element has an <span>associated CSS style sheet</span>:</p>
15705
+
15706
+ <pre><code class="js">const style = document.createElement('style');
15707
+ style.disabled = true;
15708
+ style.textContent = 'body { background-color: red; }';
15709
+ document.body.append(style);
15710
+ console.log(style.disabled); // false</code></pre>
15711
+ </div>
15712
+
15676
15713
<p>The <dfn element-attr for="style"><code data-x="attr-style-media">media</code></dfn> attribute
15677
15714
says which media the styles apply to. The value must be a <span>valid media query list</span>.
15678
15715
<span w-nodev>The user agent must apply the styles when the <code
@@ -15799,7 +15836,7 @@ interface <dfn interface>HTMLStyleElement</dfn> : <span>HTMLElement</span> {
15799
15836
<dt><span data-x="concept-css-style-sheet-owner-CSS-rule">owner CSS rule</span></dt>
15800
15837
<dd><p>null</p></dd>
15801
15838
15802
- <dt><span data-x="concept-css-style-sheet-disabeld -flag">disabled flag</span></dt>
15839
+ <dt><span data-x="concept-css-style-sheet-disabled -flag">disabled flag</span></dt>
15803
15840
<dd><p>Left at its default value.</p></dd>
15804
15841
15805
15842
<dt><span data-x="concept-css-style-sheet-CSS-rules">CSS rules</span></dt>
@@ -26104,7 +26141,7 @@ document.body.appendChild(wbr);</code></pre>
26104
26141
<dt><span data-x="concept-css-style-sheet-owner-CSS-rule">owner CSS rule</span></dt>
26105
26142
<dd><p>null</p></dd>
26106
26143
26107
- <dt><span data-x="concept-css-style-sheet-disabeld -flag">disabled flag</span></dt>
26144
+ <dt><span data-x="concept-css-style-sheet-disabled -flag">disabled flag</span></dt>
26108
26145
<dd><p>Left at its default value.</p></dd>
26109
26146
26110
26147
<dt><span data-x="concept-css-style-sheet-CSS-rules">CSS rules</span></dt>
0 commit comments