Closed Bug 1048339 Opened 10 years ago Closed 10 years ago

[WebComponents] Can't access prototype from constructor returned from document.createElement

Categories

(Core :: DOM: Core & HTML, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1081037

People

(Reporter: wilsonpage, Unassigned)

Details

var proto = Object.create(HTMLElement.prototype); proto.foo = 'foo'; var MyElement = document.registerElement('my-element', { prototype: proto }); ACTUAL MyElement.prototype; //=> undefined EXPECTED MyElement.prototype; //=> { foo: 'foo' } TEST CASE http://jsbin.com/luyaw/1/quiet
Hi Wilson, Is this bug still valid? Because I am now getting something (not undefined) in the alert. http://jsbin.com/gomuwucanepu/1/quiet But I am getting JavaScript error: app://communications.gaiamobile.org/shared/elements/gaia-header/dist/script.js, line 430: this.configureActionButton .
(In reply to Achal from comment #1) > Is this bug still valid? Because I am now getting something (not undefined) > in the alert. The original demo [1] still alerts 'undefined'. This is nothing to do with gaia-header, but how custom-elements work in the platform. [1] http://jsbin.com/luyaw/1/quiet
Ohh my mistake. I was looking for gaia bugs and found this https://github.com/mozilla-b2g/gaia/blob/master/shared/elements/gaia-header/dist/script.js#L655 . So I thought this has something to do with it. Now I understand this bus report corresponds to firefox browser, totally overlooked that, sorry.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.