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 26852 - [Custom]: Specify preference of localName and typeExtension in createElement
Summary: [Custom]: Specify preference of localName and typeExtension in createElement
Status: RESOLVED MOVED
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: 14968
  Show dependency treegraph
 
Reported: 2014-09-19 10:00 UTC by Deepak Singla
Modified: 2015-07-06 08:14 UTC (History)
4 users (show)

See Also:


Attachments

Description Deepak Singla 2014-09-19 10:00:15 UTC
As specified in instantiation of custom elements that "custom tag" will take preference over "type extension", it is required to specify the same in case of createElement(...) .

 Element createElement(DOMString localName, DOMString typeExtension);

Here if localName is also a custom tag, then what will be the prototype of "Element"? Will it be of typeExtension or of localName.

Consider the following case:

var xA = doc.registerElement("x-a");
var xB = doc.registerElement("x-b");

var customElement = doc.createElement("x-a", "x-b");

What should be the prototype of customElement?

AFAIK, this will be the same case as specifying:

<x-a is="x-b"></x-a>

In this case prototype will be of "x-a".

If the above theory is correct, then web-platform-tests/custom-elements/instantiating-custom-elements/extensions-to-document-interface/create-element-interface-type-is-a-type-extension.html test case is wrong.

If this issue has been raised earlier, then please provide the link and close this bug.
Comment 1 Hayato Ito 2015-07-06 08:14:11 UTC
Moved to https://github.com/w3c/webcomponents/issues/167