is
Summary
Describes the base element from which the element with this attribute is extended.
Applies to | dom/HTMLElement |
---|
Examples
Markup for an extended element.
<button is="mega-button">
Creates the custom element 'mega-button’, which is extended from the ‘button’ element.
var megaButton = document.createElement('button', 'mega-button');
// megaButton instanceof MegaButton === true
Usage
The extended element name must contain at least one dash (-). So for example, <x-foo>, <foo-element>, and <my-foo-element> are valid names, while <tabs> and <foo_bar> are not.
Notes
The custom element name must not be one of the following existing hyphen-containing element names:
- annotation-xml
- color-profile
- font-face
- font-face-src
- font-face-uri
- font-face-format
- font-face-name
- missing-glyph
Related specifications
- Custom Elements
- Working draft
See also
Related articles
Web Components
External resources
See Custom Elements on HTML5Rocks!.
Attributions
Portions of this content come from HTML5Rocks! Custom Elements article