W3C home > Mailing lists > Public > www-dom@w3.org > October to December 2009

Re: Changes to DOM3 Events Key Identifiers

From: Doug Schepers <schepers@w3.org>
Date: Fri, 30 Oct 2009 04:24:43 -0400
Message-ID: <4AEAA2CB.3020308@w3.org>
To: www-dom@w3.org
Hi, Alex-

Alex Danilo wrote (on 10/30/09 4:05 AM):
>
> --Original Message--:
>>
>>As editor of the DOM3 Events specification, I made what some may
>>consider to be drastic changes in the most recent drafts:
>>   * I changed the syntax of the key identifier strings from "U+xxxx" (a
>>plain string representing the Unicode code point) to "\uxxxx" (an
>>escaped UTF-16 character string), based on content author and
>>implementer feedback.
>
> I think this is a terrible change.
>
> Predominantly for SVG Tiny 1.2 user agents that want to support
> DOM3 as well.
>
> In Tiny devices memory footprint is critical and this just introduces
> an entire extra set of strings that will bloat the binary for no
> added functionality.

Why not simply store the Unicode code point, and compose it with "U+" or 
"\u" on the fly?


> The "\uxxxx" syntax is just reminiscent of a programming language
> but has little to do with strings returned from DOM APIs. I suppose
> you could argue that it's useful in some situations, but my concern
> is more about the existence of 2 things that mean the same
> thing.
>
> i.e. in a CDF document, the script has to deal with "U+xxxx" or
> "\uxxx" dependent on which namespace the element is living
> in.   I know that you can use 'keyIdentifier' and 'keyValue' to
> distinguish them, however that pushes the detection logic
> to the wrong place.

How so?  If the author gets SVGT1.2's ".keyIdentifier" attribute, the 
code point is prepended with "U+", and with ".key", it's prepended with 
"\u".  Am I missing some point of optimization?

FWIW, we heard feedback from BitFlash that authors did not like the "U+" 
syntax, and I believe they may have made some concession to convenience 
in their implementation (though I don't know the details).


>>   * I renamed the "key identifier(s)" feature to "key value(s)".
>
> That is a nice change - and does reflect what the semantics
> are. It's also a minimal implementation burden to support both
> keyIdentifier and keyValue.

Actually, the name of the attribute on the Key interface has been 
changed to ".key", which is simpler, if less descriptive.

Regards-
-Doug Schepers
W3C Team Contact, SVG and WebApps WGs
Received on Friday, 30 October 2009 08:24:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Friday, 22 June 2012 06:14:04 GMT