[whatwg] ECMAScript extensions in Web Applications
Krzysztof Maczynski
chris___m at hotmail.com
Wed Oct 19 06:46:31 PDT 2005
> Are you suggesting that any
> Function object should have a .handleEvent() method in addition to its
> .call() method and its .prototype attribute? What would be the point?
Consistency. The exceptional treatment for ECMAScript described in the WD is:
1) Not merely a language binding feature. It's another DOM for another language. Variability from language to language is acceptable but differences should be justified. Let me describe an ideal situation. In my opinion it would be when a translator whose input language is X and output language is Y didn't need any knowledge of the extensions. Generic, purely syntactic rules for rewriting names of host objects, methods etc. should be enough.
2) A simplification for implementors, not requiring features not currently implemented, and possible to do without when ECMAScript-only, error-free, only to be run and not inspected, applications written in Notepad are concerned. Since this simplification only works in languages where functions are first-class objects, you mandate its use in ECMAScript only (possibly with particular implementations: JavaScript, JScript). If being able to declare current browsers compliant is a highest priority requirement, this is an argument for making this interface explicitly present on functions in such languages (and the spec should say _all_ such languages) not a MUST. Now in the WD it's MUST NOT. The arguments I presented are for making it SHOULD or at the very least MAY.
Regards,
Chris
More information about the whatwg
mailing list