W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

Re: proposal to expose word breaker through JavaScript

From: Anne van Kesteren <annevk@opera.com>
Date: Thu, 30 Jul 2009 13:55:00 +0200
To: "Xiaomei Ji" <xji@chromium.org>, amla70@gmail.com
Cc: public-webapps@w3.org, ap@webkit.org, jshin@chromium.org
Message-ID: <op.uxvp1yvz64w2qv@annevk-t60>
Thanks for the reply!

On Wed, 29 Jul 2009 20:17:13 +0200, Xiaomei Ji <xji@chromium.org> wrote:
> "word" is a keyword.  Like Microsoft's
> spec<http://msdn.microsoft.com/en-us/library/ms536421%28VS.85%29.aspx>,
> a range could be extended to a 'character', a 'word', a 'sentence', or a
> 'line' etc.
>
> As to whether it should be a method in Document or in Range, it is open  
> to discussion.

I think putting it on Range similar to what Microsoft has done would be better. Document is already pretty bloated.


>> And finally, use cases would help as well as a definition of "word
>> boundary" and how this works/won't work in an international context.
>
> A word is the smallest semantic form in one language. In languages use  
> space to break word, such as English, a word is a collection of characters
> terminated by a space or punctuation. In languages do not use space to  
> break word, such as Chinese, word breaker is needed to break a word.
>
> The API should work for English, at least. Whether it works in an
> international context depends on whether the layout engine/browser  
> supports correct word breaker in that language.

I do think we should define this.


I think the main problem here is that we do not have an editor for a new version of DOM Range. There are several other extensions that browsers have implemented and emulated from each other that would be nice to document clearly, but so far nobody has volunteered.

(It could maybe be done as a separate draft as well, similarly to how CSSOM View extends DOM Range, but updating DOM Range to today's standards for specifications would be good I think.)


-- 
Anne van Kesteren
http://annevankesteren.nl/
Received on Thursday, 30 July 2009 11:55:42 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 18:49:33 GMT