A TransparentContainer
node is an object intended to be used as a primitive in templating systems. It's effectively a DocumentFragment
node that is not "unwrapped" upon insertion. TransparentContainer
nodes can be arbitrarily nested.
Selector matching and rendering will act as if any TransparentContainer
nodes in the node tree are replaced by their contents.
Hierarchy restrictions placed upon nodes will need to apply to the children of TransparentContainer
nodes as if the TransparentContainer
node was not there. We can simplify these requirements somewhat by only allowing TransparentContainer
nodes as descendants of the root element.
[Constructor,
Exposed=Window]
interface TransparentContainer : Node {
};
A TransparentContainer
node can be created using new TransparentContainer()
.
For instance, when you construct
TransparentContainerStart
it has an internal pointer toTransparentContainerEnd
and vice versa (also exposed through.end
and.start
). When you insertTransparentContainerStart
it insertsTransparentContainerEnd
as the next sibling. When you removeTransparentContainerStart
it also removes the correspondingTransparentContainerEnd
. When you removeTransparentContainerEnd
it throws.TransparentContainerStart
exposes all the operations to mutate the content betweenTransparentContainerStart
andTransparentContainerEnd
, such astextContent
andinnerHTML
.