Skip to content

Commit

Permalink
[giow] (0) Provide a forceSpellCheck() method.
Browse files Browse the repository at this point in the history
Fixing https://www.w3.org/Bugs/Public/show_bug.cgi?id=19473
Affected topics: DOM APIs, HTML

git-svn-id: http://svn.whatwg.org/webapps@7471 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Oct 19, 2012
1 parent 8749175 commit 4a0651c
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 37 deletions.
40 changes: 28 additions & 12 deletions complete.html
Expand Up @@ -11233,6 +11233,7 @@ <h4 id=elements-in-the-dom><span class=secno>3.2.2 </span>Elements in the DOM</h
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>;
Expand Down Expand Up @@ -79111,6 +79112,17 @@ <h4 id=spelling-and-grammar-checking><span class=secno>8.6.5 </span>Spelling and

</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
Expand Down Expand Up @@ -79203,18 +79215,22 @@ <h4 id=spelling-and-grammar-checking><span class=secno>8.6.5 </span>Spelling and

<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>

<p>If checking is disabled, the user agent should not indicate
spelling or grammar errors for that text.</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>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>

Expand Down
40 changes: 28 additions & 12 deletions index
Expand Up @@ -11233,6 +11233,7 @@ partial interface <dfn id=document>Document</dfn> {
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>;
Expand Down Expand Up @@ -79111,6 +79112,17 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>

</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
Expand Down Expand Up @@ -79203,18 +79215,22 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>

<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>

<p>If checking is disabled, the user agent should not indicate
spelling or grammar errors for that text.</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>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>

Expand Down
43 changes: 30 additions & 13 deletions source
Expand Up @@ -11614,6 +11614,7 @@ partial interface <dfn>Document</dfn> {
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>;
Expand Down Expand Up @@ -92528,6 +92529,17 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>

</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">
Expand Down Expand Up @@ -92650,19 +92662,24 @@ addShortcutKeyLabel(document.getElementById('c'));</pre>

</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 checking is disabled, the user agent should not indicate
spelling or grammar errors for that text.</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>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">

Expand Down

0 comments on commit 4a0651c

Please sign in to comment.