HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
40377699Define when reset event fires.2009-09-29 08:40
@@ -34127,23 +34127,37 @@ interface <dfn>HTMLFormElement</dfn> : <span>HTMLElement</span> {
 
   <hr>
 
   <p>The <dfn title="dom-form-submit"><code>submit()</code></dfn>
   method, when invoked, must <span
   title="concept-form-submit">submit</span> the <code>form</code>
   element from the <code>form</code> element itself, with the <var
   title="">scripted-submit</var> flag set.</p>
 
   <p>The <dfn title="dom-form-reset"><code>reset()</code></dfn>
-  method, when invoked, must <span
-  title="concept-form-reset">reset</span> the <code>form</code>
-  element.</p>
+  method, when invoked, must run the following steps:</p>
+
+  <ol>
+
+   <li><p>If the <code>form</code> element is marked as <i>locked for
+   reset</i>, then abort these steps.</p></li>
+
+   <li><p>Mark the <code>form</code> element as <dfn>locked for
+   reset</dfn>.</p></li>
+
+   <li><p><span title="concept-form-reset">Reset</span> the
+   <code>form</code> element.</p></li>
+
+   <li><p>Unmark the <code>form</code> element as <i>locked for
+   reset</i>.</p></li>
+
+  </ol>
 
   <p>If the <dfn
   title="dom-form-checkValidity"><code>checkValidity()</code></dfn>
   method is invoked, the user agent must <span>statically validate the
   constraints</span> of the <code>form</code> element, and return true
   if the constraint validation return a <i>positive</i> result, and
   false if it returned a <i>negative</i> result.</p>
 
   <p>If the <dfn
   title="dom-form-dispatchFormInput"><code>dispatchFormInput()</code></dfn>
@@ -44205,25 +44219,28 @@ fur
 
   </div>
 
 
 
   <div class="impl">
 
   <h4>Resetting a form</h4>
 
   <p>When a form <var title="">form</var> is <dfn
-  title="concept-form-reset">reset</dfn>, the user agent must invoke
-  the <span title="concept-form-reset-control">reset algorithm</span>
-  of each <span title="category-reset">resettable</span> elements
-  whose <span>form owner</span> is <var title="">form</var>, and must
-  then <span>broadcast <code
+  title="concept-form-reset">reset</dfn>, the user agent must
+  <span>fire a simple event</span> called <code
+  title="event-reset">reset</code>, that is cancelable, at <var
+  title="">form</var>, and then, if that event is not canceled, must
+  invoke the <span title="concept-form-reset-control">reset
+  algorithm</span> of each <span
+  title="category-reset">resettable</span> elements whose <span>form
+  owner</span> is <var title="">form</var>, and <span>broadcast <code
   title="event-formchange">formchange</code> events</span> from <var
   title="">form</var>.</p>
 
   <p>Each <span title="category-reset">resettable</span> element
   defines its own <dfn title="concept-form-reset-control">reset
   algorithm</dfn>. Changes made to form controls as part of these
   algorithms do not count as changes caused by the user (and thus,
   e.g., do not cause <code title="event-input">input</code> events to
   fire).</p>
 

|