This specification describes a method of combining multiple DOM trees into one hierarchy and how these trees interact with each other within a document, thus enabling better composition of the DOM.
All diagrams, examples, notes, are non-normative, as well as sections explicitly marked as non-normative. Everything else in this specification is normative.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in the normative parts of this document are to be interpreted as described in [[!RFC2119]]. For readability, these words do not appear in all uppercase letters in this specification.
To help with layering and to avoid circular dependencies between various parts of specification, this document consists of three consecutive narratives:
In a sense, these parts can be viewed as math, which sets up the reasoning environment, physics, which is the theoretical reasoning about the concept, and mechanics, which is the practical application of this reasoning.
Any point, at which a conforming UA must make decisions about the state or reaction to the state of the conceptual model, is captured as algorithm. The algorithms are defined in terms of processing equivalence. The processing equivalence is a constraint imposed on the algorithm implementors, requiring the output of the both UA-implemented and the specified algorithm to be exactly the same for all inputs.
See the Shadow DOM 101 as a non-normative introduction.
A document tree is a node tree [[!DOM]] whose root node is a document.
Any element can host zero or one associated node trees, called a shadow tree.
A shadow host is an element that hosts one shadow tree.
A shadow tree has an associated flag, called an encapsulation mode, which is either open or closed.
A shadow root is the root node of a shadow tree.
A node A is called a deep child of a node B, if either A is a child of B or A is the root node of the shadow tree that B hosts.
A node A is called a deep descendant of a node B, if either A is a deep child of B or A is a deep child of a node C that is a deep descendant of B.
An inclusive deep descendant is a node or one of its deep descendants.
A node A is called a deep parent of a node B if and only if B is a deep child of A.
A node A is called a deep ancestor of a node B if and only if B is a deep descendant of A.
An inclusive deep ancestor is a node or one of its deep ancestors.
When an element is an inclusive deep descendant of a document element, it is in a document deeply.
A tree of trees is a tree of node trees.
The purpose of introducing a tree of trees here is to define algorithms easily in the following sections. This is a kind of a notation techchique to make the this specification simpler.
Just like a node tree is defined as a set of relationships between nodes, a tree of trees is similarly defined as a set of relationships between node trees:
A node tree A is called an unclosed tree of a node tree B if and only if one, at least, of the following conditions is satisfied:
A node A is called an unclosed node of a node B if and only if the node tree that A participates in is an unclosed tree of the node tree that B participates in.
The ownerDocument
property of a node in a shadow tree must refers to the document of the shadow host which hosts the shadow tree.
Window
object named properties [[!HTML]] must access the nodes in the document tree.
In the figure, there are six node trees, named A
, B
, C
, D
, E
and F
.
The shadow trees, B
, C
and D
, are hosted by elements which participate in the document tree A
.
The shadow trees, E
and F
, are hosted by elements which participates in the shadow tree D
.
The following set of relationships holds in the figure:
A
's child trees is [B
, C
, D
].B
's child trees is [].C
's child trees is [].D
's child trees is [E
, F
].E
's child trees is [].F
's child trees is [].A
, is the root tree of the tree of trees.
As for a relationship between nodes, it's worth mentioning that there is no ancestor/descendant relationships between two nodes if they participate in different node trees.
A shadow root is not a child node of the shadow host. The parent node of a shadow root doesn't exist.
Because of this nature, most of existing APIs are scoped and don't affect other node trees, even though they are forming one tree of trees.
For example, document.getElementById(elementId)
never returns an element in a shadow tree,
even when the element has the given elementId
.
The same thing also applies to CSS Selectors matching. For example, a descendant combinator never descends into a node in a child shadow tree because a shadow root is not a child node of the shadow host. Unless a special CSS Selector for Shadow DOM, which is mentioned later, is used, a CSS Selector never matches an element in a different node tree.
Because ShadowRoot
inherits DocumentFragment
, as specified later,
you can use ShadowRoot.getElementByID(elementId)
to get a node in the shadow tree.
A composed tree is a node tree which is constructed out of nodes from multiple node trees in a tree of trees. The exact algorithm of constructing a composed tree is specified later.
If an element doesn't participate in a composed tree whose root node is a document, the element must not appear in the formating structure [[!CSS21]] nor create any CSS box. This behavior must not be overridden by setting the 'display' property.
In resolving CSS inheritance, an element must inherit from the parent node in the composed tree, if applicable.
The editor's draft of CSS Scoping specification [[css-scoping-1]] defines the selectors which are related to Shadow DOM. For those who would search this Shadow DOM specifaction with the name of these selectors, mentioning these selectores here:
:shadow
pseudo element/deep/
combinator, which was replaced with a >>>
combinator (or shadow piecing descendant combinator)::content
pseudo-element:host-context()
functional pseudo-classAn insertion point is a defined location where nodes in a different node tree appear instead of the nodes's original position when constructing a composed tree.
A distribution is the mechanism that determines which nodes appear at each insertion point. The exact algorithm of a distribution is specified later.
A content insertion point is an insertion point to where the child nodes of the shadow host are distributed. The content element that satisfies all of the following conditions represents a content insertion point:
Each tree of trees has the distribution result which describes the result of distributions. The distribution result must be equivalent of the following:
An insertion point A is the final destination of a node B if A is the last item of the destination insertion points of B.
When a node A is distributed into an insertion point B, the following steps must happen:
One case that deserves special consideration is the situation when an insertion point is a child node of another shadow host. In such situations, the nodes distributed into that insertion point appear as if they were child nodes of the shadow host in the context of distribution. Thus, the nodes distributed to a shadow tree could have already been distributed from its parent tree.
Despite being distributed to more than one insertion point, a node still only appears once in the composed tree at the final destination.
The distribution algorithm must be used to determine the distribution result for a tree of trees and must be equivalent to processing the following steps:
The distribution resolution algorithm must be used to determine the distribution result for a given node tree and its descendant trees, and must be equivalent to processing the following steps:
The pool population algorithm must be used to populate nodes from the child nodes of a given node and must be equivalent to processing the following steps:
The pool distribution algorithm must be used to distribute nodes in a pool into the content insertion points in a shadow tree and must be equivalent to processing the following steps:
If no nodes are distributed into a content insertion point CONTENT, the child nodes of CONTENT are distributed into CONTENT as fallback nodes.
If any condition which affects the distribution result changes, the distribution result must be updated before any use of the distribution result.
The matching criteria for an insertion point is a set of compound selectors [[!SELECTORS4]]. These compound selectors are restricted to contain only these simple selectors:
:not()
A node satisfies a matching criteria only if:
The composed tree children calculation algorithm must be used to determine the child nodes of a node in the composed tree and must be equivalent to processing the following steps:
For a given tree of trees TREE-OF-TREES, the composed tree constructed from TREE-OF-TREES must be equivalent to the following tree:
In each algorithm in this section, the Window must be considered as if it were the parent node of the Document so that the Window also receives an event.
When an event is dispatched in a shadow tree, its path either crosses the shadow trees or is terminated at the shadow root. One exception are the mutation events. The mutation event types must never be dispatched in a shadow tree.
Insert the following item after item 3 of Constructing events:
The item 4 of Dispatching events is changed to:
For the following events, scoped flag is initialized to true by default if the events are dispatched by the user agent:
abort
error
select
change
load
reset
resize
scroll
selectstart
Upstream this section into relevant specs, instead of having a fixed list here.
The event path calculation algorithm must be used to determine event path and must be equivalent to processing the following steps:
For a trusted event that has a relatedTarget
attribute, the event path would be trimmed. See the event path trimming algorithm, which is specified later.
Suppose we have the following tree of trees:
A
is a document.
E
, J
, N
, Q
and S
are shadow roots.
I
, M
, P
, R
and U
are content insertion points.
This tree of trees has the following 6 node trees, 1 document tree and 5 shadow trees:
A
, B
, C
and D
participate in that.
B
. Node E
, F
, G
, H
and I
participate in that.
H
. Node J
, K
, L
and M
participate in that.
K
. Node N
, O
and P
participate in that.
O
. Node Q
and R
participate in that.
F
. Node S
, T
and U
participate in that.
Let's assume that the distribution result of this tree of trees is:
C
are [I, M]
(C
is re-distributed)
L
are [P, R]
(L
is re-distributed)
G
are [U]
In this case, if an event is dispatched on node D
, the event path will be:
[D, C, I, M, L, P, R, Q, O, N, K, J, H, G, U, T, S, F, E, B, A]
(Window is omitted)
Note that the event path calculation algorithm is designed to achieve the following goals:
That means if we focus on one node tree and forget all other node trees, the event path would be seen as if the event happened only on the node tree which we are focused on. This is an important aspect in a sense that hosting shadow trees doesn't have any effect to the event path within the node tree the shadow host participate in as long as the event is not stopped somewhere in the descendant trees.
For example, from the view of the document tree 1, the event path would be seen as [D, C, B, A]
.
From the view of the shadow tree 2, the event path would be seen as [I, H, G, F, E]
.
The similar things also apply to other node trees.
It is also worth pointing out that if we exclude all insertion points and shadow roots from an event path, the result would be equivalent to the inclusive ancestors of the node on which the event is dispatched, in the composed tree.
In the cases where event path is across multiple node trees, the event's information about the target of the event is adjusted in order to maintain encapsulation. Event retargeting is a process of computing relative targets for each ancestor of the node at which the event is dispatched. A relative target is a node that most accurately represents the target of a dispatched event at a given ancestor while maintaining the encapsulation.
The retargeting algorithm is used to determine relative targets and must be equivalent to processing the following steps:
The value of the Event
object's target
attribute must be the result of the retargeting algorithm with the event's currentTarget
and target
as input.
The event target retargeting process must occur prior to dispatch of an event.
relatedTarget
Some events have a relatedTarget
[[!DOM-Level-3-Events]] property, which holds a node that's not the event's target, but is related to the event.
For instance, a mouseover
event's relatedTarget
may hold the node from which the mouse has moved to event's target
. In the case where relatedTarget
is in a shadow tree, the conforming UAs must not leak its actual value outside of this tree.
The value of the Event
object's relatedTarget
attribute must be the result of the retargeting algorithm with the event's currentTarget
and relatedTarget
as input. The result is called a relative related target.
The event relatedTarget retargeting process must occur prior to dispatch of an event.
The Touch
target
[[!TOUCH-EVENTS]] attribute must be adjusted in the same way as an event with a relatedTarget
. Each Touch
target
in the TouchList
returned from TouchEvent
touches()
, changedTouches()
and targetTouches()
must be the result of the retargeting algorithm with a current target and Touch
target
as input.
The focus
, DOMFocusIn
, blur
, and DOMFocusOut
events must be treated in the same way as events with a relatedTarget
, where the corresponding node that is losing focus as a result of target
gaining focus or the node that is gaining focus, and thus causing the blurring of target
acts as the related target.
In cases where both relatedTarget
and target
of a trusted event are part of the same shadow tree, the conforming UAs must stop events at the shadow root to avoid the appearance of spurious mouseover
and mouseout
events firing from the same node.
Thus, event listeners for trusted events must not be invoked on a node for which the target
and relatedTarget
are the same.
The event path trimming algorithm must be used to trim the event path for a trusted event that has a relatedTarget
attribute and
must be equivalent to processing the following steps:
target
and relatedTarget
are the same.For an untrusted event, the event path trimming algorithm is not used.
At the time of event dispatch:
MouseEvent
offsetX
and offsetY
attributes must return the coordinates relative to the origin of the padding edge of the relative targetEvent
eventPhase attribute must return AT_TARGET if the relative target is same as the node on which event listeners are invokedbubbles
attribute value is false, run these substeps:
eventPhase
attribute to AT_TARGET
Upon completion of the event dispatch, the Event
object's target
and relatedTarget
must be to the highest ancestor's relative target. Since it is possible for a script to hold on to the Event
object past the scope of event dispatch, this step is necessary to avoid revealing the nodes in shadow trees.
Suppose we have a user interface for a media controller, represented by this tree, composed of both document tree and the shadow trees. In this example, we will assume that selectors are allowed to cross the shadow boundaries and we will use these selectors to identify the elements. Also, we will invent a fictional shadow-root
element to demarcate the shadow boundaries and represent shadow roots:
<div id="player"> <shadow-root id="player-shadow-root"> <div id="controls"> <button id="play-button">PLAY</button> <input type="range" id="timeline"> <shadow-root id="timeline-shadow-root"> <div id="slider-thumb" id="timeline-slider-thumb"></div> </shadow-root> </input> <div id="volume-slider-container"> <input type="range" id="volume-slider"> <shadow-root id="volume-shadow-root"> <div id="slider-thumb" id="volume-slider-thumb"></div> </shadow-root> </input> </div> </div> </shadow-root> </div>
Let's have a user position their pointing device over the volume slider's thumb (#volume-slider-thumb
), thus triggering a mouseover
event on that node. For this event, let's pretend it has no associated relatedTarget
.
Per the retargeting algorithm, we should have the following set of ancestors and relative targets:
Ancestor | Relative Target |
---|---|
#player |
#player |
#player-shadow-root |
#volume-slider |
#controls |
#volume-slider |
#volume-slider-container |
#volume-slider |
#volume-slider |
#volume-slider |
#volume-shadow-root |
#volume-slider-thumb |
#volume-slider-thumb |
#volume-slider-thumb |
After we dispatch the mouseover
event using these newly computed relative targets, the user decides to move their pointing device over the thumb of the timeline
(#timeline-slider-thumb
). This triggers both a mouseout
event for the volume slider thumb and the mouseover
event for the timeline thumb.
Let's see how the relatedTarget
value of the volume thumb's mouseout
event is affected. For this event, the relatedTarget
is the timeline thumb (#timeline-slider-thumb
). Per the relatedTarget retargeting, we should have the following set of ancestors and adjusted related targets:
Ancestor | Relative Target | Adjusted related Target |
---|---|---|
#player |
#player |
#player |
#player-shadow-root |
#volume-slider |
#timeline |
#controls |
#volume-slider |
#timeline |
#volume-slider-container |
#volume-slider |
#timeline |
#volume-slider |
#volume-slider |
#timeline |
#volume-shadow-root |
#volume-slider-thumb |
#timeline |
#volume-slider-thumb |
#volume-slider-thumb |
#timeline |
The node, #player
, has both target
and relatedTarget
being the same value (#player
), which means that we do not dispatch the event on this node and its ancestors.
Selection [[!EDITING]] is not defined. Implementation should do their best to do what's best for them. Here's one possible, admittedly naive way:
Since nodes which are in the different node trees never have the same root, there may never exist a valid DOM range that spans multiple node trees.
Accordingly, selections may only exist within one node tree, because they are defined by a single range. The selection, returned by the window.getSelection()
method never returns a selection within a shadow tree.
The getSelection()
method of the shadow root object returns the current selection in this shadow tree.
If a node doesn’t participate in the composed tree, the node must be skipped from the navigation order [[!CSS3UI]] sequence.
For sequential focus navigation, the navigation order sequence for a given shadow tree A must be inserted into the navigation order for the parent tree B as follow:
For directional focus navigation, it is up to the user agent to integrate the navigation orders for shadow trees into the document navigation order.
To maintain encapsulation, the value of the Document object's focus API property activeElement must be adjusted. To prevent loss of information when adjusting this value, each shadow root must also have an activeElement
property to store the value of the focused element in the shadow tree.
The active element adjustment algorithm must be used to determine the value of activeElement property, and it must be equivalent to processing the following steps:
The value of the contenteditable
attribute must not propagate from shadow host to its shadow trees.
User agents with assistive technology traverse the composed tree, and thus enable full use of WAI-ARIA [[!WAI-ARIA]] semantics in the shadow trees.
Comparatively, a shadow tree can be seen as somewhere between just part of a document and itself being a document fragment. Since it is rendered, a shadow tree aims to retain the traits of a typical tree in a document. At the same time, it is an encapsulation abstraction, so it has to avoid affecting the document tree. Thus, the HTML elements must behave as specified [[!HTML]] in the shadow trees, with a few exceptions.
According to the [[!HTML]], some HTML Elements would have different behavior if they participate in a shadow tree, instead of a document tree, because their definitions require the elements to be in a document as a necessary condition for them to work. In other words, they shouldn't work if they participate in a shadow tree, even when they are in a document deeply. We must fill this gap because we expect that most of HTML Elements behave in the same way as in a document, as long as they are in a document deeply. See W3C Bug 26365 and Bug 27406 for the details. The following is the tentative summary of the discussions in the W3C bugs. We, however, haven't covered all HTML Elements and their behaviors here yet. For HTML Elements which are not explicitly stated here, they should be considered as active in a shadow tree. We are trying to update [[!HTML]] itself, instead of having monkey patches here.
HTML Elements are classified into the following categories:
Active in a shadow tree
A subset of HTML elements which must behave as if they were in the document tree, even when they participate in a shadow tree, as long as they are in a document deeply.
The following HTML elements must be classified to this category:
dialog
iframe
style
Inert in a shadow tree:
A subset of HTML elements which must behave as inert, or not part of the document tree, if they participate in a shadow tree. This is consistent how the HTML elements would behave in a document fragment.
The following HTML elements must be classified to this category:
Inert unless being rendered:
A subset of HTML elements which must behave as inert, or not part of the document tree, unless they are being rendered. In other words, if they don't particitpate in a composed tree whose root node is a document, they must behave as inert.
The following HTML elements must be classified to this category:
applet
embed
object
For example, suppose that an object
element is a child node of a shadow host, but the object
element's destination insertion points is empty.
In this case, according to the distribution algorithm and composed tree children calculation algorithm,
this element never participate in a composed tree whose root node is a document.
Therefore, this element is inert because this element is not being rendered. .
When [[!HTML]] defines the processing algorithms to traverse trees for the following attributes, they must use the composed tree.
dir
draggable
dropzone
hidden
lang
and xml:lang
spellcheck
title
This list does not include attributes that are defined elsewhere in this specification. Such attributes include:
tabindex
is defined in Focus Navigation.role
and ARIA
are defined in Assistive Technology.ShadowRoot
interfaceThe ShadowRoot
interface represents the shadow root.
Returns the current selection in the shadow tree.
When invoked, it must return the selection in the shadow tree.
Returns an element at specified coordinates.
Eventually, this needs to be part of CSSOM View Module specification [[!CSSOM-VIEW]]. See also W3C bug 27829.
When invoked, it must return result of running the following steps:
ShadowRoot
instance, throw an InvalidNodeTypeError
.x
is greater than the viewport width excluding the size of a rendered scroll bar (if any), or if y
is greater than the viewport height excluding the size of a rendered scroll bar (if any), return null.x
and y
in the viewport, determined through hit testingIt could be defined in roughly the same way as elementFromPoint. Eventually, this needs to be part of CSSOM View Module specification [[!CSSOM-VIEW]]. See also W3C bug 27829.
It could be defined in roughly the same way as caretPositionFromPoint [[!CSSOM-VIEW]]. Eventually, this needs to be part of CSSOM View Module specification [[!CSSOM-VIEW]]. See also W3C bug 27829.
Represents the currently focused element in the shadow tree.
On getting, the attribute must return the currently focused element in the shadow tree or null
, if there is none.
Represents the shadow host which hosts the context object.
On getting, the attribute must return the shadow host which hosts the context object.
Represents the markup of ShadowRoot
's contents.
On getting, the attribute must return the result of running the HTML fragment serialization algorithm with the context object as shadow host
.
On setting, these steps must be run:
shadow host
Represents the shadow root style sheets.
On getting, the attribute must return a StyleSheetList
sequence containing the shadow root style sheets.
The nodeType
attribute of a ShadowRoot
instance must return DOCUMENT_FRAGMENT_NODE
. Accordingly, the nodeName
attribute of a ShadowRoot
instance must return "#document-fragment"
.
Invoking the cloneNode()
method on a ShadowRoot
instance must always throw a DATA_CLONE_ERR
exception.
Element
InterfaceNotSupportedError
exception.InvalidStateError
exception.ShadowRoot
object.
The shadowRootInitDict
argument allows for setting the encapsulation mode.
ShadowRoot
object.ShadowRoot
object.NodeList
consisting of unclosed insertion points of the context object in the destination insertion points of the context object.
Represents the shadow root that context object hosts.
On getting, the attribute must return the shadow root that context object hosts if there is and it is open. Otherwise must return null
.
ShadowRootInit
dictionaryShadowRootMode
enumText
InterfaceNodeList
consisting of insertion points in the destination insertion points of the context object, excluding an insertion point which participates in a closed shadow tree.content
elementThe content
element represents an insertion point in the shadow tree.
If a content
element does not satisfy the condition of an insertion point, it must have the same rendering behavior as the HTMLUnknownElement
.
select
, a set of comma-separated tokensEventInit
DictionarySpecifies the scoped flag of Event
Event
InterfaceRepresents the event path.
On getting, the attribute must create and return a new JavaScript Array object, that must be equivalent to processing the following steps:
The API is not stable and may change. Use FrozenArray
as the return type of the deepPath
attribute in WebIDL.
See Issue #101
Returns the scoped flag.
Bob was asked to turn a simple list of links into a News Widget, which has links organized into two categories: breaking news and just news. The current document markup for the stories looks like this:
<ul class="stories"> <li><a href="//example.com/stories/1">A story</a></li> <li><a href="//example.com/stories/2">Another story</a></li> <li class="breaking"><a href="//example.com/stories/3">Also a story</a></li> <li><a href="//example.com/stories/4">Yet another story</a></li> <li><a href="//example.com/stories/4">Awesome story</a></li> <li class="breaking"><a href="//example.com/stories/5">Horrible story</a></li> </ul>
To organize the stories, Bob decides to use shadow DOM. Doing so will allow Bob to keep the document markup uncluttered, and harnessing the power of insertion point makes sorting stories by class name a very simple task. After getting another cup of Green Eye, he quickly mocks up the following shadow tree, to be hosted by the ul
element:
<div class="breaking"> <ul> <content select=".breaking"></content> <!-- insertion point for breaking news --> </ul> </div> <div class="other"> <ul> <content></content> <!-- insertion point for the rest of the news --> </ul> </div>
Bob then styles the newborn widget according to comps from the designer by adding this to the shadow tree mockup:
<style> div.breaking { color: Red; font-size: 20px; border: 1px dashed Purple; } div.other { padding: 2px 0 0 0; border: 1px solid Cyan; } </style>
While pondering if his company should start looking for a new designer, Bob converts the mockup to code:
function createStoryGroup(className, contentSelector) { var group = document.createElement('div'); group.className = className; // Empty string in select attribute or absence thereof work the same, so no need for special handling. group.innerHTML = '<ul><content select="' + contentSelector + '"></content></ul>'; return group; } function createStyle() { var style = document.createElement('style'); style.textContent = 'div.breaking { color: Red;font-size: 20px; border: 1px dashed Purple; }' + 'div.other { padding: 2px 0 0 0; border: 1px solid Cyan; }'; return style; } function makeShadowTree(storyList) { var root = storyList.createShadowRoot({mode: 'open'}); root.appendChild(createStyle()); root.appendChild(createStoryGroup('breaking', '.breaking')); root.appendChild(createStoryGroup('other', '')); } document.addEventListener('DOMContentLoaded', function() { [].forEach.call(document.querySelectorAll('ul.stories'), makeShadowTree); });
Well done, Bob! With the cup of coffee still half-full, the work is complete. Recognizing his awesomeness, Bob returns to teaching n00bs the ways of Puyo Puyo.
A few months pass.
It's election time. With Bob at his annual conference, Alice is charged with adding another, temporary box to the news widget, filled with election-related stories. Alice studies Bob's code, reads up on the shadow DOM spec and realizes that, thanks to multiple shadow tree support, she doesn't have to touch his code. As usual, her solution is elegant and simple, fitting neatly right under Bob's code:
// TODO(alice): BEGIN -- DELETE THIS CODE AFTER ELECTIONS ARE OVER. var ELECTION_BOX_REMOVAL_DEADLINE = ...; function createElectionStyle() { var style = document.createElement('style'); // TODO(alice): Check designer's desk for hallucinogens. style.textContent = 'div.election { color: Magenta; font-size: 24px; border: 2px dotted Fuchsia; }'; return style; } function makeElectionShadowTree(storyList) { var root = storyList.createShadowRoot({mode: 'open'}); // Add and style election story box. root.appendChild(createElectionStyle()); root.appendChild(createStoryGroup('election', '.election')); // Insert Bob's shadow tree under the election story box. root.appendChild(document.createElement('shadow')); } if (Date.now() < ELECTION_BOX_REMOVAL_DEADLINE) { document.addEventListener('DOMContentLoaded', function() { [].forEach.call(document.querySelectorAll('ul.stories'), makeElectionShadowTree); }); } // TODO(alice): END -- DELETE THIS CODE AFTER ELECTIONS ARE OVER.
Using the shadow
element allows Alice to compose Bob's widget inside of hers—without having to change a line of production code. Smiling to herself, Alice realizes that Bob may have come up with a way to keep the document markup clean, but she is the one who takes the cake for using shadow tree composition in such a cool way.
David Hyatt developed XBL 1.0, and Ian Hickson co-wrote XBL 2.0. These documents provided tremendous insight into the problem of functional encapsulation and greatly influenced this specification.
Alex Russell and his considerable forethought triggered a new wave of enthusiasm around the subject of shadow DOM and how it can be applied practically on the Web.
Dominic Cooney, Hajime Morrita, and Roland Steiner worked tirelessly to scope the problem of functional encapsulation within the confines of the Web platform and provided a solid foundation for this document.
The editor would also like to thank Alex Komoroske, Anne van Kesteren, Brandon Payton, Brian Kardell, Darin Fisher, Eric Bidelman, Deepak Sherveghar, Edward O'Connor, Elisée Maurer, Elliott Sprehn, Erik Arvidsson, Glenn Adams, Jonas Sicking, Koji Ishii, Malte Ubl, Mike Taylor, Oliver Nightingale, Olli Pettay, Rafael Weinstein, Richard Bradshaw, Ruud Steltenpool, Sam Dutton, Sergey G. Grekhov, Shinya Kawanaka, Tab Atkins, Takashi Sakamoto, and Yoshinori Sano for their comments and contributions to this specification.
This list is too short. There's a lot of work left to do. Please contribute by reviewing and filing bugs—and don't forget to ask the editor to add your name into this section.