Skip to content

Commit 54ce157

Browse files
author
Simon Pieters
committed
[cssom] Add a getter to CSSStyleDeclaration. http://www.w3.org/mid/4FB07D3C.2050907@mit.edu
1 parent 81f24a9 commit 54ce157

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

cssom/Overview.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2076,14 +2076,18 @@ <h4 id="the-cssstyledeclaration-interface"><span class="secno">6.5.1 </span>The
20762076
<pre class="idl">interface <dfn id="cssstyledeclaration">CSSStyleDeclaration</dfn> {
20772077
attribute DOMString <a href="#dom-cssstyledeclaration-csstext" title="dom-CSSStyleDeclaration-cssText">cssText</a>;
20782078
readonly attribute unsigned long <a href="#dom-cssstyledeclaration-length" title="dom-CSSStyleDeclaration-length">length</a>;
2079-
DOMString <a href="#dom-cssstyledeclaration-item" title="dom-CSSStyleDeclaration-item">item</a>(unsigned long index);
2079+
getter DOMString <a href="#dom-cssstyledeclaration-item" title="dom-CSSStyleDeclaration-item">item</a>(unsigned long index);
20802080
DOMString <a href="#dom-cssstyledeclaration-getpropertyvalue" title="dom-CSSStyleDeclaration-getPropertyValue">getPropertyValue</a>(DOMString property);
20812081
DOMString <a href="#dom-cssstyledeclaration-getpropertypriority" title="dom-CSSStyleDeclaration-getPropertyPriority">getPropertyPriority</a>(DOMString property);
20822082
void <a href="#dom-cssstyledeclaration-setproperty" title="dom-CSSStyleDeclaration-setProperty">setProperty</a>(DOMString property, DOMString value, optional [TreatNullAs=EmptyString] DOMString priority);
20832083
DOMString <a href="#dom-cssstyledeclaration-removeproperty" title="dom-CSSStyleDeclaration-removeProperty">removeProperty</a>(DOMString property);
20842084
readonly attribute <a href="#cssrule">CSSRule</a>? <a href="#dom-cssstyledeclaration-length" title="dom-CSSStyleDeclaration-length">parentRule</a>;
20852085
};</pre>
20862086

2087+
<p>The object's <a class="external" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-supported-property-indices">supported property indices</a> are the numbers in the range zero to one less than the number of declarations in
2088+
the <a href="#css-declaration-block-declarations">CSS declaration block declarations</a>. If there are no such declarations, then there are no <a class="external" href="http://dev.w3.org/2006/webapi/WebIDL/#dfn-supported-property-indices">supported property
2089+
indices</a>.
2090+
20872091
<p>The <dfn id="dom-cssstyledeclaration-csstext" title="dom-CSSStyleDeclaration-cssText"><code>cssText</code></dfn> attribute must return the result of <a href="#serialize-a-css-declaration-block" title="serialize a CSS declaration block">serializing</a> the
20882092
<a href="#css-declaration-block-declarations">CSS declaration block declarations</a>.</p>
20892093
<p>Setting the <code title="dom-CSSStyleDeclaration-cssText"><a href="#dom-cssstyledeclaration-csstext">cssText</a></code> attribute must run these steps:

cssom/Overview.src.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,14 +2006,18 @@ <h4>The <code title>CSSStyleDeclaration</code> Interface</h4>
20062006
<pre class=idl>interface <dfn>CSSStyleDeclaration</dfn> {
20072007
attribute DOMString <span title=dom-CSSStyleDeclaration-cssText>cssText</span>;
20082008
readonly attribute unsigned long <span title=dom-CSSStyleDeclaration-length>length</span>;
2009-
DOMString <span title=dom-CSSStyleDeclaration-item>item</span>(unsigned long index);
2009+
getter DOMString <span title=dom-CSSStyleDeclaration-item>item</span>(unsigned long index);
20102010
DOMString <span title=dom-CSSStyleDeclaration-getPropertyValue>getPropertyValue</span>(DOMString property);
20112011
DOMString <span title=dom-CSSStyleDeclaration-getPropertyPriority>getPropertyPriority</span>(DOMString property);
20122012
void <span title=dom-CSSStyleDeclaration-setProperty>setProperty</span>(DOMString property, DOMString value, optional [TreatNullAs=EmptyString] DOMString priority);
20132013
DOMString <span title=dom-CSSStyleDeclaration-removeProperty>removeProperty</span>(DOMString property);
20142014
readonly attribute <span>CSSRule</span>? <span title=dom-CSSStyleDeclaration-length>parentRule</span>;
20152015
};</pre>
20162016

2017+
<p>The object's <span data-anolis-spec=webidl>supported property indices</span> are the numbers in the range zero to one less than the number of declarations in
2018+
the <span>CSS declaration block declarations</span>. If there are no such declarations, then there are no <span data-anolis-spec=webidl>supported property
2019+
indices</span>.
2020+
20172021
<p>The <dfn title=dom-CSSStyleDeclaration-cssText><code>cssText</code></dfn> attribute must return the result of <span title='serialize a CSS declaration block'>serializing</span> the
20182022
<span>CSS declaration block declarations</span>.</p>
20192023
<p>Setting the <code title=dom-CSSStyleDeclaration-cssText>cssText</code> attribute must run these steps:

0 commit comments

Comments
 (0)