On Aug 16, 2013, at 5:44 AM, Arthur Barstow <art.bars...@nokia.com> wrote:

> You may recall WebApps and PFWG discussed WebApps' Input Method Editor API 
> last April ([Mins]). As such, I wanted to let you know a new WD of that spec 
> was published on August 15: <http://www.w3.org/TR/2013/WD-ime-api-20130815/>
> 
> If you have any comments, please send them to the public-webapps @ w3.org 
> list.
> 
> -Regards, ArtB
> 
> [Mins] <http://www.w3.org/2013/04/25-webapps-minutes.html#item12>
> 


This draft is much improved, but I still have one concern:

This code sample makes it clear you intend to do custom rendering of the 
suggestions list…

> // Render new suggeston list.
> for (i = 0; i < candidates.length; i++) {
>         suggest.appendChild(document.createElement('li'));
>         suggest.childNodes[i].textContent = candidates[i];
> }

But it's not apparent to me how you're alerting the user agent to avoid 
rendering the native candidate suggestions. It's also not clear to me how, 
depending on user preference, the user agent would respond to let the web 
application know that custom rendering is not allowed in this context or for 
this user. 

I'd expect something like this conditional to confirm with the UA that it's 
okay for the web app to do custom rendering of the candidates.

// check with the UA to see if web app can render custom suggestions list
if (target.inputMethodContext.preventDefaultRendering()) {
        // Render new suggeston list.
        for (i = 0; i < candidates.length; i++) {
               suggest.appendChild(document.createElement('li'));
               suggest.childNodes[i].textContent = candidates[i];
        }
} // else custom rendering is disallowed by the UA






Reply via email to