diff --git a/dom.bs b/dom.bs index 2a7c77e07..caa860474 100644 --- a/dom.bs +++ b/dom.bs @@ -2177,6 +2177,10 @@ steps:
If the open flag is set and shadow's mode is
not "open
", then return null.
If shadow's slot assignment is "manual
",
+ then return the slot in shadow's descendants whose manually assigned nodes
+ contains slottable, if any, and null otherwise.
Return the first slot in tree order in shadow's descendants whose name is slottable's name, if any, and null otherwise.
For each slottable child of host, slottable, in +
If slot's shadow root's slot assignment is "manual
",
+ then:
Set result to slot's manually assigned nodes.
Otherwise, for each slottable child of host, slottable, in tree order:
Otherwise, insert node into parent's children before child's index. -
If parent is a shadow host and node is a +
If parent is a shadow host whose shadow root's
+ slot assignment is "name
" and node is a
slottable, then assign a slot for node.
If parent's root is a shadow root, and @@ -2649,8 +2663,16 @@ indicated in the remove algorithm below.
If node is assigned, then run assign slottables for - node's assigned slot. +
If node is assigned, then: + +
If parent's root is a shadow root whose
+ root's slot assignment is "manual
",
+ then remove node from its assigned slot's manually assigned nodes.
+
+
Run assign slottables for node's assigned slot. +
If parent's root is a shadow root, and parent is a slot whose assigned nodes is the empty list, @@ -2660,6 +2682,11 @@ indicated in the remove algorithm below.
If node has an inclusive descendant that is a slot, then:
for each slot slot in node's inclusive descendants,
+ if slot's root is a shadow root whose root's
+ slot assignment is "manual
", then set slot's
+ manually assigned nodes to an empty set.
+
Run assign slottables for a tree with parent's root.
Run assign slottables for a tree with node.
@@ -5693,11 +5720,13 @@ invoked, must return a new {{DocumentFragment}} node whose no
[Exposed=Window]
interface ShadowRoot : DocumentFragment {
readonly attribute ShadowRootMode mode;
+ readonly attribute SlotAssignmentMode slotAssignment;
readonly attribute Element host;
attribute EventHandler onslotchange;
};
enum ShadowRootMode { "open", "closed" };
+enum SlotAssignmentMode { "manual", "name" };
{{ShadowRoot}} nodes are simply known as
@@ -5716,6 +5745,9 @@ It is initially set to false. Shadow roots have an associated slot assignment
+(" A shadow root's get the parent algorithm, given an event, returns
null if event's composed flag is unset and shadow root is the
root of event's path's first struct's
@@ -5733,6 +5765,9 @@ null if event's composed flag is unset and shadow roo
The In shadow-including tree order is
@@ -5856,6 +5891,7 @@ interface Element : Node {
dictionary ShadowRootInit {
required ShadowRootMode mode;
boolean delegatesFocus = false;
+ SlotAssignmentMode slotAssignment = "name";
};
@@ -6740,6 +6776,9 @@ invoked, must run these steps:
" Set shadow's slot assignment to init's
+ {{ShadowRootInit/slotAssignment}}.
+
Set this's shadow root to shadow.
Return shadow.
@@ -10137,6 +10176,7 @@ Yehuda Katz,
Yoav Weiss,
Yoichi Osato,
Yoshinori Sano,
+Yu Han,
Yusuke Abe, and
Zack Weinberg
for being awesome!
manual
" or "name
").onslotchange
event handler, whose
event handler event type is {{HTMLSlotElement/slotchange}}.
+slotAssignment
attribute's getter must
+return this's slot assignment.
custom
", then set shadow's
available to element internals to true.
+