Components/constructable DOM elements: mandatory tag registration?

>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.:

<div id="div"></div>

    function MyNewElement() {;
        // ...

    var div = document.getElementById("div");
    div.appendChild(new MyNewElement());

    // ... Look Ma, no Element.register() call!

    var text = div.innerHTML;  // <- what does this return?


- Roland

Received on Friday, 26 August 2011 08:17:38 UTC