Skip to content

[Custom]: Specify preference of localName and typeExtension in createElement (bugzilla: 26852) #167

Closed

Description

@hayatoito

Title: [Custom]: Specify preference of localName and typeExtension in createElement (bugzilla: 26852)

Migrated from: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26852


comment: 0
comment_url: https://www.w3.org/Bugs/Public/show_bug.cgi?id=26852#c0
Deepak Singla wrote on 2014-09-19 10:00:15 +0000.

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:

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.

Activity

  1. added 5 commits that reference this issue on Mar 1, 2016
    14ff59b
    d275492
    584421a
    dd2188f
    d95392f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions