Bug 68113 - dispatchEvent fails on custom components
Summary: dispatchEvent fails on custom components
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 72352 59803
  Show dependency treegraph
 
Reported: 2011-09-14 13:50 PDT by Erik Arvidsson
Modified: 2011-11-20 18:29 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Erik Arvidsson 2011-09-14 13:50:45 PDT
This depends on some of the component model patches.

function Foo() {
  HTMLElement.call(this);
}
Foo.prototype = Object.create(HTMLElement.prototype);
HTMLElement.register('x-foo', Foo);

...

document.querySelector('x-foo').dispatchEvent(new Event('bar'))

throws TypeError: Illegal invocation
Comment 1 Dominic Cooney 2011-11-20 18:29:14 PST
The prototype that exhibited this bug is an evolutionary dead-end, so ditching this bug.