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 20801 - [Custom]: Custom element generation algorithm should be careful about its argument
Summary: [Custom]: Custom element generation algorithm should be careful about its arg...
Status: RESOLVED DUPLICATE of bug 20686
Alias: None
Product: WebAppsWG
Classification: Unclassified
Component: HISTORICAL - Component Model (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dimitri Glazkov
QA Contact: public-webapps-bugzilla
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 17103
  Show dependency treegraph
 
Reported: 2013-01-29 06:06 UTC by Morrita Hajime
Modified: 2013-02-14 22:39 UTC (History)
0 users

See Also:


Attachments

Description Morrita Hajime 2013-01-29 06:06:42 UTC
In Section 4, custom element constructor generation algorithm, Step 5:

> "Set CONSTRUCTOR as the constructor property on PROTOTYPE."

If the PROTOTYPE is a built-in object like HTMLSpanElement.prototype, 
the algorithm overwrites its "constructor" property, which isn't good.
Comment 1 Morrita Hajime 2013-02-07 03:29:36 UTC
I think that we should just forbid which has "constructor" property for 
the prototype parameter. That means we cannot use HTMLSpanElement as an default.
The default will be then something like Object.create(HTMLSpanElement.prototype).
Comment 2 Dimitri Glazkov 2013-02-07 21:47:30 UTC
I see what you're saying. If the user passes in an object that is already in the middle of a prototype chain, the algorithm will be breaking it.
Comment 3 Morrita Hajime 2013-02-08 01:17:26 UTC
hat you're saying. If the user passes in an object that is already in
> the middle of a prototype chain, the algorithm will be breaking it.
Right. Basically, we shouldn't overwrite any existing properties.
Comment 4 Dimitri Glazkov 2013-02-14 22:39:52 UTC
Merging this bug with 20686.

*** This bug has been marked as a duplicate of bug 20686 ***