What is the expected behavior of removing the is = "" attribute from a Custom Element?
In section 7 of the last specification of the working draft (February 26, 2016), it should not affect the type of element:
After you create an instance of a user element, changing the attribute value
isshould not affect this element type of the user element.
attributeChangedCallback . ( is .) (Chrome Firefox dom.webcomponents.enabled):
'use strict';
const prototype = Object.create(HTMLElement.prototype);
prototype.attributeChangedCallback = function(name, oldValue, newValue) {
this.textContent = `my "${name}" attribute changed to "${newValue}"!`;
};
document.registerElement('examp-el', {prototype: prototype, extends: 'div'});
const el = document.createElement('div', 'examp-el');
el.textContent = "I'm an element!";
document.body.appendChild(el);
el.setAttribute('is', "changed once");
el.removeAttribute('is');
el.setAttribute('is', "changed twice");
el.setAttribute('is', "changed thrice");, , , . - 2.3 ( 17 2016 ):
is.