A user account is required in order to edit this wiki, but we've had to disable public user registrations due to spam.

To request an account, ask an autoconfirmed user on Chat (such as one of these permanent autoconfirmed members).

Component Model Strawman: Isolation

From WHATWG Wiki
Revision as of 02:05, 25 October 2011 by Morrita (talk | contribs)
Jump to navigation Jump to search

Overview

The isolated components definition is a provide attributed HTML file which is loaded in separate namespace. It is basically a document loaded by an iframe. But it has different way for communicating with the host document.

See also the "Isolation" section on Component_Model_Strawman:_Declarative_Syntax.

Element Registration and HTMLElementProxy

  • XXX: define the element name resolution order.

Isolated providing document can register new elements for the host document. But in slightly different way: the lifecycle callbacks including open and close use HTMLElementProxy instead of HTMLElement, that means open should return an instance of HTMLElementProxy and close callback receives it as a parameter.


<head>
  <element for="x-comment">
    <script>
       HTMLElementElement.current.open = function() {
         var element = return new HTMLElementProxy();
         element.addEventListener("message", ...
         return element;
       }});
    </script>
  </element>
</head>