Skip to content

Commit

Permalink
[e] (0) Split off contentEditable DOM aspects for resuse elsewhere.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=26329
Affected topics: DOM APIs, HTML

git-svn-id: https://svn.whatwg.org/webapps@8788 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 18, 2014
1 parent eb1281c commit fda8b05
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 17 deletions.
19 changes: 12 additions & 7 deletions complete.html
Original file line number Diff line number Diff line change
Expand Up @@ -6584,8 +6584,6 @@ <h4 id=elements-in-the-dom>3.2.2 Elements in the DOM</h4>
readonly attribute DOMString <a href=#dom-accesskeylabel id=elements-in-the-dom:dom-accesskeylabel>accessKeyLabel</a>;
attribute boolean <a href=#dom-draggable id=elements-in-the-dom:dom-draggable>draggable</a>;
[PutForwards=<a href=#dom-domsettabletokenlist-value id=elements-in-the-dom:dom-domsettabletokenlist-value-4>value</a>] readonly attribute <a href=#domsettabletokenlist id=elements-in-the-dom:domsettabletokenlist-4>DOMSettableTokenList</a> <a href=#dom-dropzone id=elements-in-the-dom:dom-dropzone>dropzone</a>;
attribute DOMString <a href=#dom-contenteditable id=elements-in-the-dom:dom-contenteditable>contentEditable</a>;
readonly attribute boolean <a href=#dom-iscontenteditable id=elements-in-the-dom:dom-iscontenteditable>isContentEditable</a>;
attribute <a href=#htmlmenuelement id=elements-in-the-dom:htmlmenuelement>HTMLMenuElement</a>? <a href=#dom-contextmenu id=elements-in-the-dom:dom-contextmenu>contextMenu</a>;
attribute boolean <a href=#dom-spellcheck id=elements-in-the-dom:dom-spellcheck>spellcheck</a>;
void <a href=#dom-forcespellcheck id=elements-in-the-dom:dom-forcespellcheck>forceSpellCheck</a>();
Expand All @@ -6599,10 +6597,11 @@ <h4 id=elements-in-the-dom>3.2.2 Elements in the DOM</h4>
readonly attribute boolean? <a href=#dom-command-ro-commandchecked id=elements-in-the-dom:dom-command-ro-commandchecked>commandChecked</a>;
};
<a href=#htmlelement id=elements-in-the-dom:htmlelement-2>HTMLElement</a> implements <a href=#globaleventhandlers id=elements-in-the-dom:globaleventhandlers>GlobalEventHandlers</a>;
<a href=#htmlelement id=elements-in-the-dom:htmlelement-3>HTMLElement</a> implements <span>ElementContentEditable</span>;

interface <dfn id=htmlunknownelement>HTMLUnknownElement</dfn> : <a href=#htmlelement id=elements-in-the-dom:htmlelement-3>HTMLElement</a> { };</pre>
interface <dfn id=htmlunknownelement>HTMLUnknownElement</dfn> : <a href=#htmlelement id=elements-in-the-dom:htmlelement-4>HTMLElement</a> { };</pre>

<p>The <code id=elements-in-the-dom:htmlelement-4><a href=#htmlelement>HTMLElement</a></code> interface holds methods and attributes related to a number of
<p>The <code id=elements-in-the-dom:htmlelement-5><a href=#htmlelement>HTMLElement</a></code> interface holds methods and attributes related to a number of
disparate features, and the members of this interface are therefore described in various different
sections of this specification.</p>

Expand Down Expand Up @@ -55154,7 +55153,13 @@ <h3 id=editing-2>6.6 Editing</h3>

<h4 id=contenteditable>6.6.1 Making document regions editable: The <code id=contenteditable:attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code> content attribute</h4>

<p>The <dfn id=attr-contenteditable><code>contenteditable</code></dfn> attribute is an
<pre class=idl>[NoInterfaceObject]
interface ElementContentEditable {
attribute DOMString <a href=#dom-contenteditable id=contenteditable:dom-contenteditable>contentEditable</a>;
readonly attribute boolean <a href=#dom-iscontenteditable id=contenteditable:dom-iscontenteditable>isContentEditable</a>;
};</pre>

<p>The <dfn id=attr-contenteditable><code>contenteditable</code></dfn> content attribute is an
<a href=#enumerated-attribute id=contenteditable:enumerated-attribute>enumerated attribute</a> whose keywords are the empty string, <code>true</code>,
and <code>false</code>. The empty string and the <code>true</code> keyword map
to the <i>true</i> state. The <code>false</code> keyword maps to the <i>false</i> state.
Expand All @@ -55164,15 +55169,15 @@ <h4 id=contenteditable>6.6.1 Making document regions editable: The <code id=cont
indicates that the element is editable if its parent is. The <i>false</i> state indicates that the
element is not editable.</p>

<dl class=domintro><dt><var>element</var> . <code id=contenteditable:dom-contenteditable><a href=#dom-contenteditable>contentEditable</a></code> [ = <var>value</var> ]<dd>
<dl class=domintro><dt><var>element</var> . <code id=contenteditable:dom-contenteditable-2><a href=#dom-contenteditable>contentEditable</a></code> [ = <var>value</var> ]<dd>

<p>Returns "<code>true</code>", "<code>false</code>", or "<code>inherit</code>", based on the state of the <code id=contenteditable:attr-contenteditable-2><a href=#attr-contenteditable>contenteditable</a></code> attribute.</p>

<p>Can be set, to change that state.</p>

<p>Throws a <code id=contenteditable:syntaxerror><a href=#syntaxerror>SyntaxError</a></code> exception if the new value isn't one of those strings.</p>

<dt><var>element</var> . <code id=contenteditable:dom-iscontenteditable><a href=#dom-iscontenteditable>isContentEditable</a></code><dd>
<dt><var>element</var> . <code id=contenteditable:dom-iscontenteditable-2><a href=#dom-iscontenteditable>isContentEditable</a></code><dd>

<p>Returns true if the element is editable; otherwise, returns false.</p>

Expand Down
19 changes: 12 additions & 7 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -6584,8 +6584,6 @@ partial /*sealed*/ interface <dfn id=document>Document</dfn> {
readonly attribute DOMString <a href=#dom-accesskeylabel id=elements-in-the-dom:dom-accesskeylabel>accessKeyLabel</a>;
attribute boolean <a href=#dom-draggable id=elements-in-the-dom:dom-draggable>draggable</a>;
[PutForwards=<a href=#dom-domsettabletokenlist-value id=elements-in-the-dom:dom-domsettabletokenlist-value-4>value</a>] readonly attribute <a href=#domsettabletokenlist id=elements-in-the-dom:domsettabletokenlist-4>DOMSettableTokenList</a> <a href=#dom-dropzone id=elements-in-the-dom:dom-dropzone>dropzone</a>;
attribute DOMString <a href=#dom-contenteditable id=elements-in-the-dom:dom-contenteditable>contentEditable</a>;
readonly attribute boolean <a href=#dom-iscontenteditable id=elements-in-the-dom:dom-iscontenteditable>isContentEditable</a>;
attribute <a href=#htmlmenuelement id=elements-in-the-dom:htmlmenuelement>HTMLMenuElement</a>? <a href=#dom-contextmenu id=elements-in-the-dom:dom-contextmenu>contextMenu</a>;
attribute boolean <a href=#dom-spellcheck id=elements-in-the-dom:dom-spellcheck>spellcheck</a>;
void <a href=#dom-forcespellcheck id=elements-in-the-dom:dom-forcespellcheck>forceSpellCheck</a>();
Expand All @@ -6599,10 +6597,11 @@ partial /*sealed*/ interface <dfn id=document>Document</dfn> {
readonly attribute boolean? <a href=#dom-command-ro-commandchecked id=elements-in-the-dom:dom-command-ro-commandchecked>commandChecked</a>;
};
<a href=#htmlelement id=elements-in-the-dom:htmlelement-2>HTMLElement</a> implements <a href=#globaleventhandlers id=elements-in-the-dom:globaleventhandlers>GlobalEventHandlers</a>;
<a href=#htmlelement id=elements-in-the-dom:htmlelement-3>HTMLElement</a> implements <span>ElementContentEditable</span>;

interface <dfn id=htmlunknownelement>HTMLUnknownElement</dfn> : <a href=#htmlelement id=elements-in-the-dom:htmlelement-3>HTMLElement</a> { };</pre>
interface <dfn id=htmlunknownelement>HTMLUnknownElement</dfn> : <a href=#htmlelement id=elements-in-the-dom:htmlelement-4>HTMLElement</a> { };</pre>

<p>The <code id=elements-in-the-dom:htmlelement-4><a href=#htmlelement>HTMLElement</a></code> interface holds methods and attributes related to a number of
<p>The <code id=elements-in-the-dom:htmlelement-5><a href=#htmlelement>HTMLElement</a></code> interface holds methods and attributes related to a number of
disparate features, and the members of this interface are therefore described in various different
sections of this specification.</p>

Expand Down Expand Up @@ -55154,7 +55153,13 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>

<h4 id=contenteditable>6.6.1 Making document regions editable: The <code id=contenteditable:attr-contenteditable><a href=#attr-contenteditable>contenteditable</a></code> content attribute</h4>

<p>The <dfn id=attr-contenteditable><code>contenteditable</code></dfn> attribute is an
<pre class=idl>[NoInterfaceObject]
interface ElementContentEditable {
attribute DOMString <a href=#dom-contenteditable id=contenteditable:dom-contenteditable>contentEditable</a>;
readonly attribute boolean <a href=#dom-iscontenteditable id=contenteditable:dom-iscontenteditable>isContentEditable</a>;
};</pre>

<p>The <dfn id=attr-contenteditable><code>contenteditable</code></dfn> content attribute is an
<a href=#enumerated-attribute id=contenteditable:enumerated-attribute>enumerated attribute</a> whose keywords are the empty string, <code>true</code>,
and <code>false</code>. The empty string and the <code>true</code> keyword map
to the <i>true</i> state. The <code>false</code> keyword maps to the <i>false</i> state.
Expand All @@ -55164,15 +55169,15 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>
indicates that the element is editable if its parent is. The <i>false</i> state indicates that the
element is not editable.</p>

<dl class=domintro><dt><var>element</var> . <code id=contenteditable:dom-contenteditable><a href=#dom-contenteditable>contentEditable</a></code> [ = <var>value</var> ]<dd>
<dl class=domintro><dt><var>element</var> . <code id=contenteditable:dom-contenteditable-2><a href=#dom-contenteditable>contentEditable</a></code> [ = <var>value</var> ]<dd>

<p>Returns "<code>true</code>", "<code>false</code>", or "<code>inherit</code>", based on the state of the <code id=contenteditable:attr-contenteditable-2><a href=#attr-contenteditable>contenteditable</a></code> attribute.</p>

<p>Can be set, to change that state.</p>

<p>Throws a <code id=contenteditable:syntaxerror><a href=#syntaxerror>SyntaxError</a></code> exception if the new value isn't one of those strings.</p>

<dt><var>element</var> . <code id=contenteditable:dom-iscontenteditable><a href=#dom-iscontenteditable>isContentEditable</a></code><dd>
<dt><var>element</var> . <code id=contenteditable:dom-iscontenteditable-2><a href=#dom-iscontenteditable>isContentEditable</a></code><dd>

<p>Returns true if the element is editable; otherwise, returns false.</p>

Expand Down
11 changes: 8 additions & 3 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -9655,8 +9655,6 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
readonly attribute DOMString <span data-x="dom-accessKeyLabel">accessKeyLabel</span>;
attribute boolean <span data-x="dom-draggable">draggable</span>;
[PutForwards=<span data-x="dom-DOMSettableTokenList-value">value</span>] readonly attribute <span>DOMSettableTokenList</span> <span data-x="dom-dropzone">dropzone</span>;
attribute DOMString <span data-x="dom-contentEditable">contentEditable</span>;
readonly attribute boolean <span data-x="dom-isContentEditable">isContentEditable</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>();
Expand All @@ -9671,6 +9669,7 @@ partial /*sealed*/ interface <dfn>Document</dfn> {
readonly attribute <span>HTMLCollection</span> <span data-x="dom-command-ro-commandTriggers">commandTriggers</span>;-->
};
<span>HTMLElement</span> implements <span>GlobalEventHandlers</span>;
<span>HTMLElement</span> implements <span>ElementContentEditable</span>;

interface <dfn>HTMLUnknownElement</dfn> : <span>HTMLElement</span> { };</pre>

Expand Down Expand Up @@ -73593,7 +73592,13 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>
<h4 id="contenteditable">Making document regions editable: The <code
data-x="attr-contenteditable">contenteditable</code> content attribute</h4>

<p>The <dfn><code data-x="attr-contenteditable">contenteditable</code></dfn> attribute is an
<pre class="idl">[NoInterfaceObject]
interface ElementContentEditable {
attribute DOMString <span data-x="dom-contentEditable">contentEditable</span>;
readonly attribute boolean <span data-x="dom-isContentEditable">isContentEditable</span>;
};</pre>

<p>The <dfn><code data-x="attr-contenteditable">contenteditable</code></dfn> content attribute is an
<span>enumerated attribute</span> whose keywords are the empty string, <code data-x="">true</code>,
and <code data-x="">false</code>. The empty string and the <code data-x="">true</code> keyword map
to the <i>true</i> state. The <code data-x="">false</code> keyword maps to the <i>false</i> state.
Expand Down

0 comments on commit fda8b05

Please sign in to comment.