Skip to content
Permalink
Browse files

Adding [SameObject] to DOMTokenLists

Fix #580.
  • Loading branch information...
Ritsyy authored and annevk committed Feb 16, 2016
1 parent 6fc8c2e commit ec1dc4d4571c61cf0c0dfe3e562898635886b412
Showing with 11 additions and 12 deletions.
  1. +11 −12 source
23 source

<p>If a reflecting IDL attribute has the type <code>DOMTokenList</code>, then on getting it must
return a <code>DOMTokenList</code> object whose associated element is the element in question and
whose associated attribute's local name is the name of the attribute in question. The same
<code>DOMTokenList</code> object must be returned every time for each attribute.</p>
whose associated attribute's local name is the name of the attribute in question.</p>

<p>If a reflecting IDL attribute has the type <code>HTMLElement</code>, or an interface that
descends from <code>HTMLElement</code>, then, on getting, it must run the following algorithm
attribute DOMString <span data-x="dom-accessKey">accessKey</span>;
readonly attribute DOMString <span data-x="dom-accessKeyLabel">accessKeyLabel</span>;
attribute boolean <span data-x="dom-draggable">draggable</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-dropzone">dropzone</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-dropzone">dropzone</span>;
attribute <span>HTMLMenuElement</span>? <span data-x="dom-contextMenu">contextMenu</span>;
attribute boolean <span data-x="dom-spellcheck">spellcheck</span>;
void <span data-x="dom-forceSpellCheck">forceSpellCheck</span>();
attribute DOMString <span data-x="dom-link-href">href</span>;
attribute DOMString? <span data-x="dom-link-crossOrigin">crossOrigin</span>;
attribute DOMString <span data-x="dom-link-rel">rel</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-relList">relList</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-relList">relList</span>;
attribute DOMString <span data-x="dom-link-media">media</span>;
attribute DOMString <span data-x="dom-link-hreflang">hreflang</span>;
attribute DOMString <span data-x="dom-link-type">type</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-sizes">sizes</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-link-sizes">sizes</span>;
};
<span>HTMLLinkElement</span> implements <span>LinkStyle</span>;</pre>
</dd>
<pre class="idl">interface <dfn>HTMLAnchorElement</dfn> : <span>HTMLElement</span> {
attribute DOMString <span data-x="dom-a-target">target</span>;
attribute DOMString <span data-x="dom-a-download">download</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-a-ping">ping</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-a-ping">ping</span>;
attribute DOMString <span data-x="dom-a-rel">rel</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-a-relList">relList</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-a-relList">relList</span>;
attribute DOMString <span data-x="dom-a-hreflang">hreflang</span>;
attribute DOMString <span data-x="dom-a-type">type</span>;

attribute DOMString <span data-x="dom-iframe-src">src</span>;
attribute DOMString <span data-x="dom-iframe-srcdoc">srcdoc</span>;
attribute DOMString <span data-x="dom-iframe-name">name</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-iframe-sandbox">sandbox</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-iframe-sandbox">sandbox</span>;
attribute boolean <span data-x="dom-iframe-allowFullscreen">allowFullscreen</span>;
attribute DOMString <span data-x="dom-dim-width">width</span>;
attribute DOMString <span data-x="dom-dim-height">height</span>;
attribute DOMString <span data-x="dom-area-shape">shape</span>;
attribute DOMString <span data-x="dom-area-target">target</span>;
attribute DOMString <span data-x="dom-area-download">download</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-area-ping">ping</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-area-ping">ping</span>;
attribute DOMString <span data-x="dom-area-rel">rel</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-area-relList">relList</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-area-relList">relList</span>;
};
<span>HTMLAreaElement</span> implements <span>HTMLHyperlinkElementUtils</span>;</pre>
</dd>
<pre class="idl">interface <dfn>HTMLTableCellElement</dfn> : <span>HTMLElement</span> {
attribute unsigned long <span data-x="dom-tdth-colSpan">colSpan</span>;
attribute unsigned long <span data-x="dom-tdth-rowSpan">rowSpan</span>;
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-tdth-headers">headers</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-tdth-headers">headers</span>;
readonly attribute long <span data-x="dom-tdth-cellIndex">cellIndex</span>;
};</pre>

<dt><span data-x="concept-element-dom">DOM interface</span>:</dt><!--TOPIC:DOM APIs-->
<dd>
<pre class="idl">interface <dfn>HTMLOutputElement</dfn> : <span>HTMLElement</span> {
[PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-output-htmlFor">htmlFor</span>;
[SameObject, PutForwards=<span data-x="dom-DOMTokenList-value">value</span>] readonly attribute <span>DOMTokenList</span> <span data-x="dom-output-htmlFor">htmlFor</span>;
readonly attribute <span>HTMLFormElement</span>? <span data-x="dom-fae-form">form</span>;
attribute DOMString <span data-x="dom-fe-name">name</span>;

0 comments on commit ec1dc4d

Please sign in to comment.
You can’t perform that action at this time.