This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 11185 - Switch the order of checking for Function-ness and a property for [Callback] objects
Summary: Switch the order of checking for Function-ness and a property for [Callback] ...
Status: RESOLVED WORKSFORME
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: WebIDL (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Cameron McCormack
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-31 22:27 UTC by Cameron McCormack
Modified: 2011-05-24 22:42 UTC (History)
2 users (show)

See Also:


Attachments

Description Cameron McCormack 2010-10-31 22:27:19 UTC
[Callback]
interface A {
  void f();
};

interface B {
  void g(in A a);
};

---

function h() { alert('1') }
h.f = function() { alert('2') }
b.g(h)

Make this alert "1" instead of "2".  (And do some testing around this.)

http://www.w3.org/mid/9768D477C67135458BF978A45BCF9B381FDA5C@TK5EX14MBXW605.wingroup.windeploy.ntdev.microsoft.com
Comment 1 Cameron McCormack 2011-05-24 22:42:44 UTC
Looks like IE, Firefox, Chrome and Opera all prefer to call the function itself rather than the handleEvent property.

http://people.mozilla.org/~cmccormack/tests/eventlistener-property.html

And it seems the spec already requires this, anyway:

http://dev.w3.org/2006/webapi/WebIDL/#native-objects