Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[] (0) WF2: <form> element summary.
git-svn-id: http://svn.whatwg.org/webapps@2142 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Sep 3, 2008
1 parent 3cb368b commit f3fd8d2
Show file tree
Hide file tree
Showing 2 changed files with 158 additions and 77 deletions.
184 changes: 117 additions & 67 deletions index
Expand Up @@ -6689,10 +6689,10 @@
<ul>
<li>It is an <code><a href="#a">a</a></code>, <code><a
href="#applet">applet</a></code>, <code><a href="#area">area</a></code>,
<code>form</code>, <code><a href="#img">img</a></code>, or <code><a
href="#object">object</a></code> element with a <code
title=attr-name>name</code> attribute equal to <var title="">key</var>,
or,
<code><a href="#form">form</a></code>, <code><a
href="#img">img</a></code>, or <code><a href="#object">object</a></code>
element with a <code title=attr-name>name</code> attribute equal to <var
title="">key</var>, or,

<li>It is an <a href="#html-elements" title="HTML elements">HTML
element</a> of any kind with an <code title=attr-id><a
Expand Down Expand Up @@ -7501,8 +7501,8 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
<p>The <dfn id=forms0 title=dom-document-forms><code>forms</code></dfn>
attribute must return an <code><a
href="#htmlcollection0">HTMLCollection</a></code> rooted at the
<code>Document</code> node, whose filter matches only <code>form</code>
elements.
<code>Document</code> node, whose filter matches only <code><a
href="#form">form</a></code> elements.

<p>The <dfn id=anchors
title=dom-document-anchors><code>anchors</code></dfn> attribute must
Expand All @@ -7524,16 +7524,17 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..
title="">name</var>)</code></dfn> method takes a string <var
title="">name</var>, and must return a live <code>NodeList</code>
containing all the <code><a href="#a">a</a></code>, <code><a
href="#applet">applet</a></code>, <code>button</code>, <code>form</code>,
<!-- frame? frameset?
XXX--><code><a href="#iframe">iframe</a></code>,
<code><a href="#img">img</a></code>, <code>input</code>, <code><a
href="#map">map</a></code>, <code><a href="#meta0">meta</a></code>,
<code><a href="#object">object</a></code>,<!-- param?
XXX-->
<code>select</code>, and <code>textarea</code> elements in that document
that have a <code title="">name</code> attribute whose value is equal to
the <var title="">name</var> argument (in a <a
href="#applet">applet</a></code>, <code>button</code>, <code><a
href="#form">form</a></code>, <!-- frame? frameset?
XXX--><code><a
href="#iframe">iframe</a></code>, <code><a href="#img">img</a></code>,
<code>input</code>, <code><a href="#map">map</a></code>, <code><a
href="#meta0">meta</a></code>, <code><a
href="#object">object</a></code>,<!-- param?
XXX--> <code>select</code>,
and <code>textarea</code> elements in that document that have a <code
title="">name</code> attribute whose value is equal to the <var
title="">name</var> argument (in a <a
href="#case-sensitive">case-sensitive</a> manner), in <a
href="#tree-order">tree order</a>.

Expand Down Expand Up @@ -26491,18 +26492,65 @@ function AddCloud(data, x, y) { ... }</pre>
title=concept-table>table</a>.

<h3 id=forms><span class=secno>4.9 </span>Forms</h3>
<!-- XXX everything in WF2 -->

<p class=big-issue>This section will contain definitions of the
<code>form</code> element and so forth.
<h4 id=the-form><span class=secno>4.9.1 </span>The <dfn
id=form><code>form</code></dfn> element</h4>

<dl class=element>
<dt>Categories

<dd><a href="#flow-content0">Flow content</a>.

<p class=big-issue>This section will be a rewrite of the HTML4 Forms and
Web Forms 2.0 specifications, with hopefully no normative changes.</p>
<!-- From HTML4: BUTTON FIELDSET FORM INPUT LABEL OPTGROUP OPTION
SELECT TEXTAREA -->
<dt>Contexts in which this element may be used:

<h4 id=the-form><span class=secno>4.9.1 </span>The <code>form</code>
element</h4>
<dd>Where <a href="#flow-content0">flow content</a> is expected.

<dt>Content model:

<dd><a href="#flow-content0">Flow content</a>, but with no <code><a
href="#form">form</a></code> element descendants.

<dt>Element-specific attributes:

<dd><code title=attr-form-accept-charset>accept-charset</code>

<dd><code title=attr-form-action>action</code>

<dd><code title=attr-form-enctype>enctype</code>

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

<dd><code title=attr-form-name>name</code>

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

<dt>DOM interface:

<dd>
<pre
class=idl>interface <dfn id=htmlformelement>HTMLFormElement</dfn> : <a href="#htmlelement">HTMLElement</a> {
attribute DOMString <span title=dom-form-accept-charset>accept-charset</span>;
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>;

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

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

void <span title=dom-form-dispatchFormInput>dispatchFormInput</span>();
void <span title=dom-form-dispatchFormChange>dispatchFormChange</span>();
};</pre>
</dl>

<p class=big-issue>...

<h4 id=the-fieldset><span class=secno>4.9.2 </span>The
<code>fieldset</code> element</h4>
Expand Down Expand Up @@ -31853,7 +31901,7 @@ never reset. This is nice and consistent.)
<dl class=element>
<dt>Categories

<dd>None.
<dd><a href="#flow-content0">Flow content</a>.

<dt>Contexts in which this element may be used:

Expand Down Expand Up @@ -33335,8 +33383,9 @@ JSURL: http://ietfreport.isoc.org/all-ids/draft-hoehrmann-javascript-scheme-00.t
context</a>, its new value must be interpreted as the body of an anonymous
function with a single argument called <code>event</code>, with the new
function's scope chain being linked from the activation object of the
handler, to the element, to the element's <code>form</code> element if it
is a form control, to the <code>Document</code> object, to the <code><a
handler, to the element, to the element's <code><a
href="#form">form</a></code> element if it is a form control, to the
<code>Document</code> object, to the <code><a
href="#window">Window</a></code> object of the <a
href="#browsing1">browsing context</a> of that <code>Document</code>. The
function's <code>this</code> parameter must be the <code>Element</code>
Expand Down Expand Up @@ -45848,8 +45897,8 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
href="#datagrid0">datagrid</a></code>, <code><a
href="#dialog">dialog</a></code>, <code>dir</code>, <code><a
href="#div">div</a></code>, <code><a href="#dl">dl</a></code>,
<code>fieldset</code>, <code><a href="#footer">footer</a></code>,
<code>form</code>, <code><a href="#h1">h1</a></code>, <code><a
<code>fieldset</code>, <code><a href="#footer">footer</a></code>, <code><a
href="#form">form</a></code>, <code><a href="#h1">h1</a></code>, <code><a
href="#h2">h2</a></code>, <code><a href="#h3">h3</a></code>, <code><a
href="#h4">h4</a></code>, <code><a href="#h5">h5</a></code>, <code><a
href="#h6">h6</a></code>, <code><a href="#header">header</a></code>,
Expand Down Expand Up @@ -47215,14 +47264,14 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
href="#dt">dt</a></code>, <code><a href="#embed">embed</a></code>,
<code><a href="#eventsource">eventsource</a></code>
<code>fieldset</code>, <code><a href="#figure">figure</a></code>,
<code><a href="#footer">footer</a></code>, <code>form</code>,
<code>frame</code>, <code>frameset</code>, <code><a
href="#h1">h1</a></code>, <code><a href="#h2">h2</a></code>, <code><a
href="#h3">h3</a></code>, <code><a href="#h4">h4</a></code>, <code><a
href="#h5">h5</a></code>, <code><a href="#h6">h6</a></code>, <code><a
href="#head">head</a></code>, <code><a href="#header">header</a></code>,
<code><a href="#hr">hr</a></code>, <code><a
href="#iframe">iframe</a></code>, <!-- <code>image</code>,
<code><a href="#footer">footer</a></code>, <code><a
href="#form">form</a></code>, <code>frame</code>, <code>frameset</code>,
<code><a href="#h1">h1</a></code>, <code><a href="#h2">h2</a></code>,
<code><a href="#h3">h3</a></code>, <code><a href="#h4">h4</a></code>,
<code><a href="#h5">h5</a></code>, <code><a href="#h6">h6</a></code>,
<code><a href="#head">head</a></code>, <code><a
href="#header">header</a></code>, <code><a href="#hr">hr</a></code>,
<code><a href="#iframe">iframe</a></code>, <!-- <code>image</code>,
(commented out because this isn't an element that can end up on the
stack, so it doesn't matter) -->
<code><a href="#img">img</a></code>, <code>input</code>,
Expand Down Expand Up @@ -47464,10 +47513,10 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
title="">head</code> element pointer</a> gets set to point to this node.

<p>The <a href="#form-element"><code title="">form</code> element
pointer</a> points to the last <code>form</code> element that was opened
and whose end tag has not yet been seen. It is used to make form controls
associate with forms in the face of dramatically bad markup, for
historical reasons.
pointer</a> points to the last <code><a href="#form">form</a></code>
element that was opened and whose end tag has not yet been seen. It is
used to make form controls associate with forms in the face of
dramatically bad markup, for historical reasons.

<h5 id=the-scripting><span class=secno>8.2.3.5. </span>The scripting state</h5>

Expand Down Expand Up @@ -50626,8 +50675,8 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
seen.</p>

<p><a href="#insert0">Insert an HTML element</a> for the token, and set
the <code title=form>form</code> element pointer to point to the element
created.</p>
the <code title=form><a href="#form">form</a></code> element pointer to
point to the element created.</p>
</dd>
<!-- as normal, but imply </li> when there's another <li> open in weird cases -->

Expand Down Expand Up @@ -51147,9 +51196,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<p>If the <a href="#form-element"><code title="">form</code> element
pointer</a> is not null, then <span>associate</span><!--XXX xref! -->
the <code>button</code> element with the <code>form</code> element
pointed to by the <a href="#form-element"><code title="">form</code>
element pointer</a>.</p>
the <code>button</code> element with the <code><a
href="#form">form</a></code> element pointed to by the <a
href="#form-element"><code title="">form</code> element pointer</a>.</p>

<p>Insert a marker at the end of the <a href="#list-of4">list of active
formatting elements</a>.</p>
Expand Down Expand Up @@ -51285,9 +51334,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<p>If the <a href="#form-element"><code title="">form</code> element
pointer</a> is not null, then <span>associate</span><!--XXX xref! -->
the newly created <code>input</code> element with the <code>form</code>
element pointed to by the <a href="#form-element"><code
title="">form</code> element pointer</a>.</p>
the newly created <code>input</code> element with the <code><a
href="#form">form</a></code> element pointed to by the <a
href="#form-element"><code title="">form</code> element pointer</a>.</p>

<dt id=isindex>A start tag whose tag name is "isindex"

Expand All @@ -51310,9 +51359,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<p>Act as if a start tag token with the tag name "form" had been seen.</p>

<p>If the token has an attribute called "action", set the <code
title=attr-form-action>action</code> attribute on the resulting
<code>form</code> element to the value of the "action" attribute of the
token.</p>
title=attr-form-action>action</code> attribute on the resulting <code><a
href="#form">form</a></code> element to the value of the "action"
attribute of the token.</p>

<p>Act as if a start tag token with the tag name "hr" had been seen.</p>

Expand Down Expand Up @@ -51369,8 +51418,8 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<p>If the <a href="#form-element"><code title="">form</code> element
pointer</a> is not null, then <span>associate</span><!--XXX xref! -->
the newly created <code>textarea</code> element with the
<code>form</code> element pointed to by the <a
the newly created <code>textarea</code> element with the <code><a
href="#form">form</a></code> element pointed to by the <a
href="#form-element"><code title="">form</code> element pointer</a>.</p>

<p>Switch the tokeniser's <a href="#content4">content model flag</a> to
Expand Down Expand Up @@ -51413,9 +51462,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {

<p>If the <a href="#form-element"><code title="">form</code> element
pointer</a> is not null, then <span>associate</span><!--XXX xref! -->
the <code>select</code> element with the <code>form</code> element
pointed to by the <a href="#form-element"><code title="">form</code>
element pointer</a>.</p>
the <code>select</code> element with the <code><a
href="#form">form</a></code> element pointed to by the <a
href="#form-element"><code title="">form</code> element pointer</a>.</p>

<p>If the <span>insertion mode</span> is one of <a href="#in-table"
title="insertion mode: in table">in table</a>", "<a href="#in-caption"
Expand Down Expand Up @@ -51872,9 +51921,9 @@ interface <dfn id=messagechannel>MessageChannel</dfn> {
<p>If the <a href="#form-element"><code title="">form</code> element
pointer</a> is not null, then <span>associate</span><!--XXX
xref! -->
the <code>input</code> element with the <code>form</code> element
pointed to by the <a href="#form-element"><code title="">form</code>
element pointer</a>.</p>
the <code>input</code> element with the <code><a
href="#form">form</a></code> element pointed to by the <a
href="#form-element"><code title="">form</code> element pointer</a>.</p>

<p>Pop that <code>input</code> element off the <a href="#stack">stack of
open elements</a>.</p>
Expand Down Expand Up @@ -53184,8 +53233,9 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
<i><a href="#quirks">quirks mode</a></i>

<li>The association between form controls and forms that aren't their
nearest <code>form</code> element ancestor (use of the <a
href="#form-element"><code>form</code> element pointer</a> in the parser)
nearest <code><a href="#form">form</a></code> element ancestor (use of
the <a href="#form-element"><code>form</code> element pointer</a> in the
parser)
</ul>

<p class=note>The mutations allowed by this section apply <em>after</em>
Expand Down Expand Up @@ -53499,10 +53549,10 @@ http://lxr.mozilla.org/seamonkey/search?string=nested
<li>
<p>Set the parser's <a href="#form-element"><code>form</code> element
pointer</a> to the nearest node to the <var title="">context</var>
element that is a <code>form</code> element (going straight up the
ancestor chain, and including the element itself, if it is a
<code>form</code> element), or, if there is no such <code>form</code>
element, to null.</p>
element that is a <code><a href="#form">form</a></code> element (going
straight up the ancestor chain, and including the element itself, if it
is a <code><a href="#form">form</a></code> element), or, if there is no
such <code><a href="#form">form</a></code> element, to null.</p>

<li>
<p>Place into the <a href="#input0">input stream</a> for the <a
Expand Down
51 changes: 41 additions & 10 deletions source
Expand Up @@ -23882,19 +23882,50 @@ function AddCloud(data, x, y) { ... }</pre>


<h3 id="forms">Forms</h3>
<!-- XXX everything in WF2 -->

<p class="big-issue">This section will contain definitions of the
<code>form</code> element and so forth.</p>
<h4>The <dfn><code>form</code></dfn> element</h4>

<p class="big-issue">This section will be a rewrite of the HTML4
Forms and Web Forms 2.0 specifications, with hopefully no normative
changes.</p>
<dl class="element">
<dt>Categories</dt>
<dd><span>Flow content</span>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <span>flow content</span> is expected.</dd>
<dt>Content model:</dt>
<dd><span>Flow content</span>, but with no <code>form</code> element descendants.</dd>
<dt>Element-specific attributes:</dt>
<dd><code title="attr-form-accept-charset">accept-charset</code></dd>
<dd><code title="attr-form-action">action</code></dd>
<dd><code title="attr-form-enctype">enctype</code></dd>
<dd><code title="attr-form-method">method</code></dd>
<dd><code title="attr-form-name">name</code></dd>
<dd><code title="attr-form-target">target</code></dd>
<dt>DOM interface:</dt>
<dd>
<pre class="idl">interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
attribute DOMString <span title="dom-form-accept-charset">accept-charset</span>;
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>;

readonly attribute <span>HTMLFormControlsCollection</span> <span title="dom-form-elements">elements</span>;
readonly attribute long <span title="dom-form-length">length</span>;
[IndexGetter] <span>HTMLElement</span> <span title="dom-form-XXX7">XXX7</span>(in unsigned long index);
[NameGetter] Object <span title="dom-form-XXX8">XXX8</span>(in DOMString name);

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

void <span title="dom-form-dispatchFormInput">dispatchFormInput</span>();
void <span title="dom-form-dispatchFormChange">dispatchFormChange</span>();
};</pre>
</dd>
</dl>

<!-- From HTML4: BUTTON FIELDSET FORM INPUT LABEL OPTGROUP OPTION
SELECT TEXTAREA -->
<p class="big-issue">...</p>

<h4>The <code>form</code> element</h4>

<h4>The <code>fieldset</code> element</h4>

Expand Down Expand Up @@ -29067,7 +29098,7 @@ never reset. This is nice and consistent.)

<dl class="element">
<dt>Categories</dt>
<dd>None.</dd>
<dd><span>Flow content</span>.</dd>
<dt>Contexts in which this element may be used:</dt>
<dd>Where <span>flow content</span> is expected.</dd>
<dt>Content model:</dt>
Expand Down

0 comments on commit f3fd8d2

Please sign in to comment.