Skip to content

Commit 645f41d

Browse files
author
Simon Pieters
committed
[cssom] Make .style better defined and add [putForwards=cssText] (present in the HTML spec). https://www.w3.org/Bugs/Public/show_bug.cgi?id=21848
1 parent 06ffaee commit 645f41d

2 files changed

Lines changed: 17 additions & 8 deletions

File tree

cssom/Overview.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2392,16 +2392,16 @@ <h2 id="dom-access-to-css-declaration-blocks"><span class="secno">7 </span>DOM A
23922392

23932393
<h3 id="the-elementcssinlinestyle-interface"><span class="secno">7.1 </span>The <code>ElementCSSInlineStyle</code> Interface</h3>
23942394

2395-
The <code>ElementCSSInlineStyle</code> interface is implemented by <code>Element</code> objects in order to provide access to inline style properties.
2395+
<p>The <code>ElementCSSInlineStyle</code> interface provides access to inline style properties of an element.</p>
23962396
<pre class="idl"><span class="idlInterface" id="widl-def-ElementCSSInlineStyle">[NoInterfaceObject]
23972397
interface <span class="idlInterfaceID">ElementCSSInlineStyle</span> {
2398-
<span class="idlAttribute"> readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-ElementCSSInlineStyle-style">style</a></span>;</span>
2398+
<span class="idlAttribute"> [PutForwards=cssText] readonly attribute <span class="idlAttrType"><a>CSSStyleDeclaration</a></span> <span class="idlAttrName"><a href="#widl-ElementCSSInlineStyle-style">style</a></span>;</span>
23992399
};</span></pre>
24002400
<dl class="attributes">
24012401
<dt class="attribute" id="widl-ElementCSSInlineStyle-style">
24022402
<dfn id="widl-ElementCSSInlineStyle-style"><code>style</code></dfn> of type <span class="idlAttrType"><a>CSSStyleDeclaration</a></span>, readonly</dt>
24032403
<dd>
2404-
The <code><a href="#widl-ElementCSSInlineStyle-style">style</a></code> attribute must return a mutable <code>CSSStyleDeclaration</code> object that represents the inline style properties of the associated <code>Element</code> instance.</dd>
2404+
<p>The <code><a href="#widl-ElementCSSInlineStyle-style">style</a></code> attribute must return a <a href="#css-declaration-block">CSS declaration block</a> with the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a> being set to the declarations specified in the element's <code title="">style</code> content attribute. If the <code title="">style</code> content attribute is absent, the object represents an empty declaration. Mutating the <code>CSSStyleDeclaration</code> object must set the <code title="">style</code> content attribute on the element to the <a href="#serialize-a-css-declaration-block" title="serialize a CSS declaration block">serialization</a> of the <code>CSSStyleDeclaration</code>'s <a href="#css-declaration-block-declarations">CSS declaration block declarations</a>. The same object must be returned each time. The object is be live; if the <code title="">style</code> content attribute is set, changed or removed, the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a> must be updated as appropriate.</dd>
24052405
</dl>
24062406

24072407

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
11
[NoInterfaceObject,
22
Documentation=
3-
"The {@name} {@type} is implemented by <code>Element</code> objects in order to provide access to inline style properties."
3+
"<p>The {@name} {@type} provides access to inline style properties of an element.</p>"
44
]
55
interface ElementCSSInlineStyle {
66

77
[Documentation=
8-
"The {@name} {@type} must return a mutable <code>CSSStyleDeclaration</code> object\
9-
that represents the inline style properties of the associated <code>Element</code> instance."
10-
]
11-
readonly attribute CSSStyleDeclaration style;
8+
"<p>The {@name} {@type} must return a <span>CSS declaration block</span> with the\
9+
<span>CSS declaration block declarations</span> being set to the declarations\
10+
specified in the element's <code title>style</code> content attribute. If the\
11+
<code title>style</code> content attribute is absent, the object represents an empty\
12+
declaration. Mutating the <code>CSSStyleDeclaration</code> object must set the\
13+
<code title>style</code> content attribute on the element to the\
14+
<span title='serialize a CSS declaration block'>serialization</span> of the\
15+
<code>CSSStyleDeclaration</code>'s <span>CSS declaration block declarations</span>.\
16+
The same object must be returned each time. The object is be live; if the\
17+
<code title>style</code> content attribute is set, changed or removed, the <span>CSS\
18+
declaration block declarations</span> must be updated as appropriate.</p>"
19+
,
20+
PutForwards=cssText] readonly attribute CSSStyleDeclaration style;
1221

1322
};

0 commit comments

Comments
 (0)