[html5] r7471 - [giow] (0) Provide a forceSpellCheck() method. Fixing https://www.w3.org/Bugs/Pu [...]

whatwg at whatwg.org whatwg at whatwg.org
Fri Oct 19 12:17:05 PDT 2012


Author: ianh
Date: 2012-10-19 12:17:03 -0700 (Fri, 19 Oct 2012)
New Revision: 7471

Modified:
   complete.html
   index
   source
Log:
[giow] (0) Provide a forceSpellCheck() method.
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=19473
Affected topics: DOM APIs, HTML

Modified: complete.html
===================================================================
--- complete.html	2012-10-19 18:56:00 UTC (rev 7470)
+++ complete.html	2012-10-19 19:17:03 UTC (rev 7471)
@@ -11233,6 +11233,7 @@
   readonly attribute boolean <a href=#dom-iscontenteditable title=dom-isContentEditable>isContentEditable</a>;
            attribute <a href=#htmlmenuelement>HTMLMenuElement</a>? <a href=#dom-contextmenu title=dom-contextMenu>contextMenu</a>;
            attribute boolean <a href=#dom-spellcheck title=dom-spellcheck>spellcheck</a>;
+  void <a href=#dom-forcespellcheck title=dom-forceSpellCheck>forceSpellCheck</a>();
 
   // <a href=#command-api>command API</a>
   readonly attribute DOMString? <a href=#dom-command-ro-commandtype title=dom-command-ro-commandType>commandType</a>;
@@ -79111,6 +79112,17 @@
 
    </dd>
 
+
+   <dt><var title="">element</var> . <code title=dom-forceSpellCheck><a href=#dom-forcespellcheck>forceSpellCheck</a></code>()</dt>
+
+   <dd>
+
+    <p>Forces the user agent to report spelling and grammar errors on the element (if checking is
+    enabled), even if the user has never focused the element. (If the method is not invoked, user
+    agents can hide errors in text that wasn't just entered by the user.)</p>
+
+   </dd>
+
   </dl><div class=impl>
 
   <p>The <dfn id=dom-spellcheck title=dom-spellcheck><code>spellcheck</code></dfn> IDL
@@ -79203,19 +79215,23 @@
 
    <li>Otherwise, checking is disabled.</li>
 
-  </ol><p>If the checking is enabled for a word/sentence/text, the user
-  agent should indicate spelling and/or grammar errors in that
-  text. User agents should take into account the other semantics given
-  in the document when suggesting spelling and grammar
-  corrections. User agents may use the language of the element to
-  determine what spelling and grammar rules to use, or may use the
-  user's preferred language settings. UAs should use
-  <code><a href=#the-input-element>input</a></code> element attributes such as <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> to ensure that the
-  resulting value is valid, where possible.</p>
+  </ol><p>If the checking is enabled for a word/sentence/text, the user agent should indicate spelling
+  and/or grammar errors in that text. User agents should take into account the other semantics given
+  in the document when suggesting spelling and grammar corrections. User agents may use the language
+  of the element to determine what spelling and grammar rules to use, or may use the user's
+  preferred language settings. UAs should use <code><a href=#the-input-element>input</a></code> element attributes such as <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> to ensure that the resulting value is valid, where
+  possible.</p>
 
-  <p>If checking is disabled, the user agent should not indicate
-  spelling or grammar errors for that text.</p>
+  <p>If checking is disabled, the user agent should not indicate spelling or grammar errors for that
+  text.</p>
 
+  <p>Even when checking is enabled, user agents may opt to not report spelling or grammar errors in
+  text that the user agent deems the user has no interest in having checked (e.g. text that was
+  already present when the page was loaded, or that the user did not type, or text in controls that
+  the user has not focused). The <dfn id=dom-forcespellcheck title=dom-forceSpellCheck><code>forceSpellCheck()</code></dfn> method, when invoked on an
+  element, must override this behavior, forcing the user agent to consider all spelling and grammar
+  errors in text in that element for which checking is enabled to be of interest to the user.</p>
+
   <div class=example>
 
    <p>The element with ID "a" in the following example would be the

Modified: index
===================================================================
--- index	2012-10-19 18:56:00 UTC (rev 7470)
+++ index	2012-10-19 19:17:03 UTC (rev 7471)
@@ -11233,6 +11233,7 @@
   readonly attribute boolean <a href=#dom-iscontenteditable title=dom-isContentEditable>isContentEditable</a>;
            attribute <a href=#htmlmenuelement>HTMLMenuElement</a>? <a href=#dom-contextmenu title=dom-contextMenu>contextMenu</a>;
            attribute boolean <a href=#dom-spellcheck title=dom-spellcheck>spellcheck</a>;
+  void <a href=#dom-forcespellcheck title=dom-forceSpellCheck>forceSpellCheck</a>();
 
   // <a href=#command-api>command API</a>
   readonly attribute DOMString? <a href=#dom-command-ro-commandtype title=dom-command-ro-commandType>commandType</a>;
@@ -79111,6 +79112,17 @@
 
    </dd>
 
+
+   <dt><var title="">element</var> . <code title=dom-forceSpellCheck><a href=#dom-forcespellcheck>forceSpellCheck</a></code>()</dt>
+
+   <dd>
+
+    <p>Forces the user agent to report spelling and grammar errors on the element (if checking is
+    enabled), even if the user has never focused the element. (If the method is not invoked, user
+    agents can hide errors in text that wasn't just entered by the user.)</p>
+
+   </dd>
+
   </dl><div class=impl>
 
   <p>The <dfn id=dom-spellcheck title=dom-spellcheck><code>spellcheck</code></dfn> IDL
@@ -79203,19 +79215,23 @@
 
    <li>Otherwise, checking is disabled.</li>
 
-  </ol><p>If the checking is enabled for a word/sentence/text, the user
-  agent should indicate spelling and/or grammar errors in that
-  text. User agents should take into account the other semantics given
-  in the document when suggesting spelling and grammar
-  corrections. User agents may use the language of the element to
-  determine what spelling and grammar rules to use, or may use the
-  user's preferred language settings. UAs should use
-  <code><a href=#the-input-element>input</a></code> element attributes such as <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> to ensure that the
-  resulting value is valid, where possible.</p>
+  </ol><p>If the checking is enabled for a word/sentence/text, the user agent should indicate spelling
+  and/or grammar errors in that text. User agents should take into account the other semantics given
+  in the document when suggesting spelling and grammar corrections. User agents may use the language
+  of the element to determine what spelling and grammar rules to use, or may use the user's
+  preferred language settings. UAs should use <code><a href=#the-input-element>input</a></code> element attributes such as <code title=attr-input-pattern><a href=#attr-input-pattern>pattern</a></code> to ensure that the resulting value is valid, where
+  possible.</p>
 
-  <p>If checking is disabled, the user agent should not indicate
-  spelling or grammar errors for that text.</p>
+  <p>If checking is disabled, the user agent should not indicate spelling or grammar errors for that
+  text.</p>
 
+  <p>Even when checking is enabled, user agents may opt to not report spelling or grammar errors in
+  text that the user agent deems the user has no interest in having checked (e.g. text that was
+  already present when the page was loaded, or that the user did not type, or text in controls that
+  the user has not focused). The <dfn id=dom-forcespellcheck title=dom-forceSpellCheck><code>forceSpellCheck()</code></dfn> method, when invoked on an
+  element, must override this behavior, forcing the user agent to consider all spelling and grammar
+  errors in text in that element for which checking is enabled to be of interest to the user.</p>
+
   <div class=example>
 
    <p>The element with ID "a" in the following example would be the

Modified: source
===================================================================
--- source	2012-10-19 18:56:00 UTC (rev 7470)
+++ source	2012-10-19 19:17:03 UTC (rev 7471)
@@ -11614,6 +11614,7 @@
   readonly attribute boolean <span title="dom-isContentEditable">isContentEditable</span>;
            attribute <span>HTMLMenuElement</span>? <span title="dom-contextMenu">contextMenu</span>;
            attribute boolean <span title="dom-spellcheck">spellcheck</span>;
+  void <span title="dom-forceSpellCheck">forceSpellCheck</span>();
 
   // <span>command API</span>
   readonly attribute DOMString? <span title="dom-command-ro-commandType">commandType</span>;
@@ -92528,6 +92529,17 @@
 
    </dd>
 
+
+   <dt><var title="">element</var> . <code title="dom-forceSpellCheck">forceSpellCheck</code>()</dt>
+
+   <dd>
+
+    <p>Forces the user agent to report spelling and grammar errors on the element (if checking is
+    enabled), even if the user has never focused the element. (If the method is not invoked, user
+    agents can hide errors in text that wasn't just entered by the user.)</p>
+
+   </dd>
+
   </dl>
 
   <div class="impl">
@@ -92650,20 +92662,25 @@
 
   </ol>
 
-  <p>If the checking is enabled for a word/sentence/text, the user
-  agent should indicate spelling and/or grammar errors in that
-  text. User agents should take into account the other semantics given
-  in the document when suggesting spelling and grammar
-  corrections. User agents may use the language of the element to
-  determine what spelling and grammar rules to use, or may use the
-  user's preferred language settings. UAs should use
-  <code>input</code> element attributes such as <code
-  title="attr-input-pattern">pattern</code> to ensure that the
-  resulting value is valid, where possible.</p>
+  <p>If the checking is enabled for a word/sentence/text, the user agent should indicate spelling
+  and/or grammar errors in that text. User agents should take into account the other semantics given
+  in the document when suggesting spelling and grammar corrections. User agents may use the language
+  of the element to determine what spelling and grammar rules to use, or may use the user's
+  preferred language settings. UAs should use <code>input</code> element attributes such as <code
+  title="attr-input-pattern">pattern</code> to ensure that the resulting value is valid, where
+  possible.</p>
 
-  <p>If checking is disabled, the user agent should not indicate
-  spelling or grammar errors for that text.</p>
+  <p>If checking is disabled, the user agent should not indicate spelling or grammar errors for that
+  text.</p>
 
+  <p>Even when checking is enabled, user agents may opt to not report spelling or grammar errors in
+  text that the user agent deems the user has no interest in having checked (e.g. text that was
+  already present when the page was loaded, or that the user did not type, or text in controls that
+  the user has not focused). The <dfn
+  title="dom-forceSpellCheck"><code>forceSpellCheck()</code></dfn> method, when invoked on an
+  element, must override this behavior, forcing the user agent to consider all spelling and grammar
+  errors in text in that element for which checking is enabled to be of interest to the user.</p>
+
   <div class="example">
 
    <p>The element with ID "a" in the following example would be the




More information about the Commit-Watchers mailing list