Skip to content

Commit

Permalink
[] (0) WF2: form.name and form.submit()
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.whatwg.org/webapps@2173 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 13, 2008
1 parent c2f8ae1 commit bca075f
Show file tree
Hide file tree
Showing 2 changed files with 102 additions and 64 deletions.
123 changes: 71 additions & 52 deletions index
Expand Up @@ -29,7 +29,7 @@

<h1 id=html-5>HTML 5</h1>

<h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 12
<h2 class="no-num no-toc" id=draft>Draft Recommendation &mdash; 13
September 2008</h2>

<p>You can take part in this work. <a
Expand Down Expand Up @@ -6770,12 +6770,12 @@
<li>If, at the time the method is called, there is exactly one node in the
collection that has either an <code title=attr-id><a
href="#id">id</a></code> attribute or a <code title=attr-fe-name><a
href="#name9">name</a></code> attribute equal to <var title="">key</var>,
then return that node and stop the algorithm.
href="#name11">name</a></code> attribute equal to <var
title="">key</var>, then return that node and stop the algorithm.

<li>Otherwise, if there are no nodes in the collection that have either an
<code title=attr-id><a href="#id">id</a></code> attribute or a <code
title=attr-fe-name><a href="#name9">name</a></code> attribute equal to
title=attr-fe-name><a href="#name11">name</a></code> attribute equal to
<var title="">key</var>, then return null and stop the algorithm.

<li>Otherwise, create a <code>NodeList</code> object representing a live
Expand All @@ -6784,7 +6784,7 @@
object, further filtered so that the only nodes in the
<code>NodeList</code> object are those that have either an <code
title=attr-id><a href="#id">id</a></code> attribute or a <code
title=attr-fe-name><a href="#name9">name</a></code> attribute equal to
title=attr-fe-name><a href="#name11">name</a></code> attribute equal to
<var title="">key</var>. The nodes in the <code>NodeList</code> object
must be sorted in <a href="#tree-order">tree order</a>.

Expand Down Expand Up @@ -26577,34 +26577,34 @@ function AddCloud(data, x, y) { ... }</pre>
<dd><code title=attr-form-accept-charset><a
href="#accept-charset">accept-charset</a></code>

<dd><code title=attr-form-action>action</code>
<dd><code title=attr-fs-action><a href="#action">action</a></code>

<dd><code title=attr-form-enctype>enctype</code>
<dd><code title=attr-fs-enctype><a href="#enctype">enctype</a></code>

<dd><code title=attr-form-method>method</code>
<dd><code title=attr-fs-method><a href="#method">method</a></code>

<dd><code title=attr-form-name>name</code>
<dd><code title=attr-form-name><a href="#name9">name</a></code>

<dd><code title=attr-form-target>target</code>
<dd><code title=attr-fs-target><a href="#target3">target</a></code>

<dt>DOM interface:

<dd>
<pre
class=idl>interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <a href="#accept-charset0" title=dom-form-accept-charset>accept-charset</a>;
attribute DOMString <span title=dom-form-action>action</span>;
attribute DOMString <span title=dom-form-enctype>enctype</span>;
attribute DOMString <span title=dom-form-method>method</span>;
attribute DOMString <span title=dom-form-name>name</span>;
attribute DOMString <span title=dom-form-target>target</span>;
attribute DOMString <a href="#action0" title=dom-fs-action>action</a>;
attribute DOMString <a href="#enctype0" title=dom-fs-enctype>enctype</a>;
attribute DOMString <a href="#method0" title=dom-fs-method>method</a>;
attribute DOMString <a href="#name10" title=dom-form-name>name</a>;
attribute DOMString <a href="#target4" title=dom-fs-target>target</a>;

readonly attribute <a href="#htmlformcontrolscollection0">HTMLFormControlsCollection</a> <a href="#elements3" title=dom-form-elements>elements</a>;
readonly attribute long <a href="#length6" title=dom-form-length>length</a>;
[IndexGetter] <a href="#htmlelement">HTMLElement</a> <a href="#xxx7" title=dom-form-XXX7>XXX7</a>(in unsigned long index);
[NameGetter] Object <a href="#xxx8" title=dom-form-XXX8>XXX8</a>(in DOMString name);

void <span title=dom-form-submit>submit</span>();
void <a href="#submit" title=dom-form-submit>submit</a>();
void <span title=dom-form-reset>reset</span>();
boolean <span title=dom-form-checkValidity>checkValidity</span>();

Expand All @@ -26625,12 +26625,23 @@ function AddCloud(data, x, y) { ... }</pre>
href="#ascii-compatible">ASCII-compatible character encoding</a>. <a
href="#refsIANACHARSET">[IANACHARSET]</a>

<p class=big-issue>...
<p>The <dfn id=name9 title=attr-form-name><code>name</code></dfn> attribute
represents the <code><a href="#form">form</a></code>'s name within the
<code title=dom-forms>forms</code> collection. The value must not be the
empty string, and the value must be unique amongst the <code><a
href="#form">form</a></code> elements in the <code
title=dom-forms>forms</code> collection that it is in, if any.

<p>The <code title=attr-fs-action><a href="#action">action</a></code>,
<code title=attr-fs-enctype><a href="#enctype">enctype</a></code>, <code
title=attr-fs-method><a href="#method">method</a></code>, and <code
title=attr-fs-target><a href="#target3">target</a></code> are <a
href="#attributes5">attributes for form submission</a>.

<p>The <dfn id=accept-charset0
title=dom-form-accept-charset><code>accept-charset</code></dfn> DOM
attribute must <a href="#reflect">reflect</a> the content attribute of the
same name.
title=dom-form-accept-charset><code>accept-charset</code></dfn> and <dfn
id=name10 title=dom-form-name><code>name</code></dfn> DOM attributes must
<a href="#reflect">reflect</a> the content attributes of the same name.

<p>The <dfn id=elements3
title=dom-form-elements><code>elements</code></dfn> DOM attribute must
Expand Down Expand Up @@ -26668,6 +26679,14 @@ function AddCloud(data, x, y) { ... }</pre>
title=dom-form-elements><a href="#elements3">elements</a></code>
collection if it was invoked with the same arguments.

<p>The <dfn id=submit title=dom-form-submit><code>submit()</code></dfn>
method, when invoked, must <a href="#submitted"
title=concept-form-submit>submit</a> the <code><a
href="#form">form</a></code> element from the <code><a
href="#form">form</a></code> element itself.

<p class=big-issue>...

<h4 id=the-fieldset><span class=secno>4.9.2 </span>The <dfn
id=fieldset><code>fieldset</code></dfn> element</h4>

Expand Down Expand Up @@ -26695,7 +26714,7 @@ function AddCloud(data, x, y) { ... }</pre>

<dd><code title=attr-fae-form><a href="#form0">form</a></code>

<dd><code title=attr-fe-name><a href="#name9">name</a></code>
<dd><code title=attr-fe-name><a href="#name11">name</a></code>

<dt>DOM interface:

Expand All @@ -26704,7 +26723,7 @@ function AddCloud(data, x, y) { ... }</pre>
class=idl>interface <dfn id=htmlfieldsetelement>HTMLFieldSetElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <span title=dom-fieldset-disabled>disabled</span>;
readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <a href="#form1" title=dom-fae-form>form</a>;
attribute DOMString <a href="#name10" title=dom-fe-name>name</a>;
attribute DOMString <a href="#name12" title=dom-fe-name>name</a>;

readonly attribute DOMString <span title=dom-select-type>type</span>;

Expand Down Expand Up @@ -26786,7 +26805,7 @@ function AddCloud(data, x, y) { ... }</pre>

<dd><code title=attr-input-min>min</code>

<dd><code title=attr-fe-name><a href="#name9">name</a></code>
<dd><code title=attr-fe-name><a href="#name11">name</a></code>

<dd><code title=attr-input-pattern>pattern</code>

Expand Down Expand Up @@ -26827,7 +26846,7 @@ function AddCloud(data, x, y) { ... }</pre>
attribute long <span title=dom-input-maxLength>maxLength</span>;
attribute DOMString <span title=dom-input-method>method</span>;
attribute DOMString <span title=dom-input-min>min</span>;
attribute DOMString <a href="#name10" title=dom-fe-name>name</a>;
attribute DOMString <a href="#name12" title=dom-fe-name>name</a>;
attribute DOMString <span title=dom-input-pattern>pattern</span>;
attribute boolean <span title=dom-input-readOnly>readOnly</span>;
attribute boolean <span title=dom-input-required>required</span>;
Expand Down Expand Up @@ -26909,7 +26928,7 @@ function AddCloud(data, x, y) { ... }</pre>

<dd><code title=attr-button-method>method</code>

<dd><code title=attr-fe-name><a href="#name9">name</a></code>
<dd><code title=attr-fe-name><a href="#name11">name</a></code>

<dd><code title=attr-button-target>target</code>

Expand All @@ -26928,7 +26947,7 @@ function AddCloud(data, x, y) { ... }</pre>
attribute DOMString <span title=dom-button-enctype>enctype</span>;
readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <a href="#form1" title=dom-fae-form>form</a>;
attribute DOMString <span title=dom-button-method>method</span>;
attribute DOMString <a href="#name10" title=dom-fe-name>name</a>;
attribute DOMString <a href="#name12" title=dom-fe-name>name</a>;
attribute DOMString <span title=dom-button-target>target</span>;
attribute DOMString <span title=dom-button-type>type</span>;
attribute DOMString <span title=dom-button-value>value</span>;
Expand Down Expand Up @@ -27020,7 +27039,7 @@ function AddCloud(data, x, y) { ... }</pre>

<dd><code title=attr-select-multiple>multiple</code>

<dd><code title=attr-fe-name><a href="#name9">name</a></code>
<dd><code title=attr-fe-name><a href="#name11">name</a></code>

<dd><code title=attr-select-size>size</code>

Expand All @@ -27033,7 +27052,7 @@ function AddCloud(data, x, y) { ... }</pre>
attribute boolean <a href="#disabled4" title=dom-fe-disabled>disabled</a>;
readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <a href="#form1" title=dom-fae-form>form</a>;
attribute boolean <span title=dom-select-multiple>multiple</span>;
attribute DOMString <a href="#name10" title=dom-fe-name>name</a>;
attribute DOMString <a href="#name12" title=dom-fe-name>name</a>;
attribute boolean <span title=dom-select-size>size</span>;

readonly attribute DOMString <span title=dom-select-type>type</span>;
Expand Down Expand Up @@ -27239,7 +27258,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem

<dd><code title=attr-textarea-maxlength>maxlength</code>

<dd><code title=attr-fe-name><a href="#name9">name</a></code>
<dd><code title=attr-fe-name><a href="#name11">name</a></code>

<dd><code title=attr-textarea-pattern>pattern</code>

Expand All @@ -27263,7 +27282,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <a href="#form1" title=dom-fae-form>form</a>;
attribute DOMString <span title=dom-textarea-inputmode>inputmode</span>;
attribute long <span title=dom-textarea-maxLength>maxLength</span>;
attribute DOMString <a href="#name10" title=dom-fe-name>name</a>;
attribute DOMString <a href="#name12" title=dom-fe-name>name</a>;
attribute DOMString <span title=dom-textarea-pattern>pattern</span>;
attribute boolean <span title=dom-textarea-readOnly>readOnly</span>;
attribute boolean <span title=dom-textarea-required>required</span>;
Expand Down Expand Up @@ -27317,7 +27336,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem

<dd><code title=attr-fae-form><a href="#form0">form</a></code>

<dd><code title=attr-fe-name><a href="#name9">name</a></code>
<dd><code title=attr-fe-name><a href="#name11">name</a></code>

<dt>DOM interface:

Expand All @@ -27326,7 +27345,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
class=idl>interface <dfn id=htmloutputelement>HTMLOutputElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <span title=dom-output-wrap>htmlFor</span>;
readonly attribute <a href="#htmlformelement">HTMLFormElement</a> <a href="#form1" title=dom-fae-form>form</a>;
attribute DOMString <a href="#name10" title=dom-fe-name>name</a>;
attribute DOMString <a href="#name12" title=dom-fe-name>name</a>;

readonly attribute DOMString <span title=dom-output-type>type</span>;
attribute DOMString <span title=dom-output-defaultValue>defaultValue</span>;
Expand Down Expand Up @@ -27443,13 +27462,13 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
getting, must return the element's <a href="#form-owner">form owner</a>,
or null if there isn't one.

<h4 id=attributes1><span class=secno>4.9.13 </span>Attributes common to
form controls</h4>
<h4 id=attributes1><span class=secno>4.9.13 </span><dfn
id=attributes4>Attributes common to form controls</dfn></h4>

<p class=big-issue>... <dfn id=name9 title=attr-fe-name>name</dfn> content
<p class=big-issue>... <dfn id=name11 title=attr-fe-name>name</dfn> content
attribute

<p class=big-issue>... <dfn id=name10 title=dom-fe-name>name</dfn> DOM
<p class=big-issue>... <dfn id=name12 title=dom-fe-name>name</dfn> DOM
attribute

<p class=big-issue>... <dfn id=disabled2
Expand All @@ -27463,8 +27482,8 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem

<p class=big-issue>... <dfn id=value8 title=concept-fe-value>value</dfn>

<h4 id=attributes2><span class=secno>4.9.14 </span>Attributes for form
submission</h4>
<h4 id=attributes2><span class=secno>4.9.14 </span><dfn
id=attributes5>Attributes for form submission</dfn></h4>

<p class=big-issue>... <dfn id=action title=attr-fs-action>action</dfn>
content attribute
Expand Down Expand Up @@ -27612,7 +27631,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
<ol>
<li>
<p>If the <var title="">field</var> element has an <code
title=attr-fe-name><a href="#name9">name</a></code> attribute
title=attr-fe-name><a href="#name11">name</a></code> attribute
specified and value is not the empty string, let <var
title="">name</var> be that value followed by a single U+002E FULL
STOP (.) character. Otherwise, let <var title="">name</var> be the
Expand Down Expand Up @@ -27657,9 +27676,9 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem

<li>
<p>If the <var title="">field</var> element does not have a <code
title=attr-fe-name><a href="#name9">name</a></code> attribute
title=attr-fe-name><a href="#name11">name</a></code> attribute
specified, or its <code title=attr-fe-name><a
href="#name9">name</a></code> attribute's value is the empty string,
href="#name11">name</a></code> attribute's value is the empty string,
skip these substeps for this element: if there are any more elements
in <var title="">controls</var>, return to the top of the <a
href="#constructing-form-data-set">constructing the form data set</a>
Expand All @@ -27669,7 +27688,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
<li>
<p>Let <var title="">name</var> be the value of the <var
title="">field</var> element's <code title=attr-fe-name><a
href="#name9">name</a></code> attribute.
href="#name11">name</a></code> attribute.

<li>
<p>If the <var title="">field</var> element is a <code><a
Expand Down Expand Up @@ -27752,9 +27771,9 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem

<td> <a href="#mutate" title=submit-mutate-action>Mutate action</a>

<td> <a href="#submit" title=submit-body>Submit as entity body</a>
<td> <a href="#submit0" title=submit-body>Submit as entity body</a>

<td> <a href="#submit" title=submit-body>Submit as entity body</a>
<td> <a href="#submit0" title=submit-body>Submit as entity body</a>

<td> <a href="#delete" title=submit-delete-action>Delete action</a>

Expand All @@ -27763,9 +27782,9 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem

<td> <a href="#mutate" title=submit-mutate-action>Mutate action</a>

<td> <a href="#submit" title=submit-body>Submit as entity body</a>
<td> <a href="#submit0" title=submit-body>Submit as entity body</a>

<td> <a href="#submit" title=submit-body>Submit as entity body</a>
<td> <a href="#submit0" title=submit-body>Submit as entity body</a>

<td> <a href="#delete" title=submit-delete-action>Delete action</a>

Expand Down Expand Up @@ -27850,7 +27869,7 @@ interface <dfn id=htmloptionelement>HTMLOptionElement</dfn> : <a href="#htmlelem
purpose by the steps above, then it must be navigated with <a
href="#replacement">replacement enabled</a>.</p>

<dt><dfn id=submit title=submit-body>Submit as entity body</dfn>
<dt><dfn id=submit0 title=submit-body>Submit as entity body</dfn>

<dd>
<p>Let <var title="">entity body</var> be the result of encoding the
Expand Down Expand Up @@ -33907,7 +33926,7 @@ never reset. This is nice and consistent.)
// the current browsing context
readonly attribute <a href="#window">Window</a> <a href="#window0" title=dom-window>window</a>;
readonly attribute <a href="#window">Window</a> <a href="#self" title=dom-self>self</a>;
attribute DOMString <a href="#name11" title=dom-name>name</a>;
attribute DOMString <a href="#name13" title=dom-name>name</a>;
[PutForwards=href] readonly attribute <a href="#location2">Location</a> <a href="#location0" title=dom-document-location>location</a>;
readonly attribute <a href="#history3">History</a> <a href="#history2" title=dom-history>history</a>;
readonly attribute <a href="#undomanager">UndoManager</a> <a href="#undomanager0" title=dom-undoManager>undoManager</a>;
Expand Down Expand Up @@ -34111,7 +34130,7 @@ never reset. This is nice and consistent.)
context</a> that was navigated, or null if no browsing context was
navigated.

<p>The <dfn id=name11 title=dom-name><code>name</code></dfn> attribute of
<p>The <dfn id=name13 title=dom-name><code>name</code></dfn> attribute of
the <code><a href="#window">Window</a></code> object must, on getting,
return the current name of the <a href="#browsing1">browsing context</a>,
and, on setting, set the name of the <a href="#browsing1">browsing
Expand Down Expand Up @@ -47175,13 +47194,13 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
characters</a>.

<li>Then, the start tag may have a number of attributes, the <a
href="#attributes4" title=syntax-attributes>syntax for which</a> is
href="#attributes6" title=syntax-attributes>syntax for which</a> is
described below. Attributes may be separated from each other by one or
more <a href="#space" title="space character">space characters</a>.

<li>After the attributes, there may be one or more <a href="#space"
title="space character">space characters</a>. (Some attributes are
required to be followed by a space. See the <a href="#attributes4"
required to be followed by a space. See the <a href="#attributes6"
title=syntax-attributes>attributes section</a> below.)

<li>Then, if the element is one of the <a href="#void-elements">void
Expand Down Expand Up @@ -47218,7 +47237,7 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<h5 id=attributes3><span class=secno>8.1.2.3. </span>Attributes</h5>

<p><dfn id=attributes4 title=syntax-attributes>Attributes</dfn> for an
<p><dfn id=attributes6 title=syntax-attributes>Attributes</dfn> for an
element are expressed inside the element's start tag.

<p>Attributes have a name and a value. <dfn id=attribute3
Expand Down

0 comments on commit bca075f

Please sign in to comment.