Re: Components/constructable DOM elements: mandatory tag registration?

2011-08-26 Thread Dominic Cooney
I think HTMLElement.call should throw if there’s not an associated tag name. However exactly how that association happens, I am not sure. JavaScript can’t rely on the 'constructor' property. Shadowing the tagName attribute on the prototype is not ideal, because it may be mutable and it would be co

Components/constructable DOM elements: mandatory tag registration?

2011-08-26 Thread Roland Steiner
>From the discussion about "x-" prefixed names another question crossed my mind: Suppose an author defines a component, but doesn't register a tag name. AFAICT, at this point nothing prevents him from inserting such a new element into the DOM. E.g.: function MyNewElement() { HTMLEle