Re: Functions that Implement the EventListener Interface (DOM Level 3 Events)

Hi Rob.

Rob Brackett:
> For what it's worth, I think WebKit's current behavior is preferable
> (in my case, myConstructor.handleEvent() would have been called
> instead of myConstructor()), though it is different from how Firefox,
> Opera, and Chrome behave (myConstructor() would be called instead of
> myConstructor.handleEvent()). At the very least, it would be nice the
> get the wording here more clear.

Web IDL defines that for interfaces with [Callback] on them, such as
EventListener [1][2], that the function itself takes precedence over the
property [3].

[1] http://www.w3.org/TR/DOM-Level-3-Events/#webidl-events-EventListener
[2] http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#eventlistener
[3] http://dev.w3.org/2006/webapi/WebIDL/#native-objects

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Tuesday, 14 June 2011 00:41:52 UTC