- From: Bjoern Hoehrmann <derhoermi@gmx.net>
- Date: Wed, 15 Mar 2006 15:57:10 +0100
- To: "Sergey Ilinsky" <sergey@backbase.com>
- Cc: "\"Web APIs WG\"" <public-webapi@w3.org>
* Sergey Ilinsky wrote:
>> >The only problem with syncing both ways that I can think of
>> >is that it requires that the implementation has a reliable
>> >.toSource() implementation. I'm not sure if that is a too
>> >harsh requirement.
>>
>> ECMA-262 requires this, as far as I can tell.
>
>ECMA-262 has nothing to do with the browser DOM
I'm not sure what you mean. Clearly the DOM specifications need to say
how the abstract interfaces map to ECMA-262 language concepts, and for
the specific issue at hand, if .onfoo attributes are Function objects,
Function.prototype.toString() is quite relevant:
15.3.4.2 Function.prototype.toString()
An implementation-dependent representation of the function
is returned. This representation has the syntax of a
FunctionDeclaration. Note in particular that the use and
placement of white space, line terminators, and semicolons
within the representation string is implementation-dependent.
The toString function is not generic; it throws a TypeError
exception if its this value is not a Function object.
Therefore, it cannot be transferred to other kinds of objects
for use as a method.
--
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Received on Wednesday, 15 March 2006 14:57:15 UTC