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: Difference between revisions

From WHATWG Wiki
Jump to navigation Jump to search
Line 7: Line 7:
The element registration and template definition are also done in a separate HTML.
The element registration and template definition are also done in a separate HTML.
Effective markup vocabulary for the defining HTML is limited.
Effective markup vocabulary for the defining HTML is limited.
Agents only recognize the first head element and its descendant.
Agents only recognize the first <tt>head element</tt> and its descendant.


<pre>
<pre>

Revision as of 17:31, 28 October 2011

Overview

Loading an External HTML Resource

The element registration and template definition are also done in a separate HTML. Effective markup vocabulary for the defining HTML is limited. Agents only recognize the first head element and its descendant.


<html>
  <head>
    <element for="x-comment">..</element>
  </head>
</html>

The host element can load the html with element definition using a link element with its rel attribute set to component.


<html>
  <head>
    <link rel=”component” type=”text/html” href="comment.html">
  </head>
</html>

The confined attribute

Author can add the confined attribute to confine the component definition.


<html>
  <head>
    <link rel=”component” type=”text/html” href="comment.html" confined>
  </head>
</html>