W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2011

Components/constructable DOM elements: mandatory tag registration?

From: Roland Steiner <rolandsteiner@google.com>
Date: Fri, 26 Aug 2011 17:16:51 +0900
Message-ID: <CACFPSpgNzNa4oDJJcC2Zsyhh3z0a9ees=wJeUMBBnx2MBB6NGA@mail.gmail.com>
To: WebApps WG <public-webapps@w3.org>
Cc: Dimitri Glazkov <dglazkov@google.com>, Dominic Cooney <dominicc@google.com>, Hajime Morita <morrita@google.com>
>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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:13:23 UTC