You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Any element in a shadow tree can have a <dfn element-attr for=html-global>partmap</dfn> attribute.
160
+
If the element is a shadow host,
161
+
this is used to expose elements from inside this host's <a>shadow tree</a><
10BC0
/span> to outside this host's containing <a>shadow tree</a>.
137
162
163
+
The partmap attribute is parsed as a comma-separated list of part mappings.
164
+
Each part mapping is one of:
165
+
166
+
<dl class=switch>
138
167
: <code>ident1 => ident2</code>
139
168
:: If el is a <a>shadow host</a>,
140
169
and it's <a>shadow root's</a><a>shadow part map</a> |partMap| [=map/contains=] ident1,
141
170
then this adds «[ ident2 → |partMap|[ident1] ]» to the <a>shadow part map</a> of the <a>shadow root</a> containing el.
142
171
172
+
: <code>ident</code>
173
+
:: Is equivalent to <code>ident => ident</code>.
174
+
143
175
: <code>* => prefix*</code>
144
176
:: If el is a <a>shadow host</a>,
145
177
then [=map/for each=] |ident| → |subEl| in el's <a>shadow root's</a><a>shadow part map</a>,
@@ -149,26 +181,9 @@ Each part mapping is one of:
149
181
:: Ignored for error-recovery / future compat.
150
182
</dl>
151
183
152
-
Issue: Factor this out into an algorithm.
153
-
154
-
Issue: The value in the map is a set of elements, not individual elements; need to properly append.
155
-
156
-
Issue: Want a way to forward a name with the same name, without repeating the name (currently requires `foo => foo`).
157
-
158
184
Issue: When doing prefixed-wildcard forwarding, should probably automatically exclude sub-parts that are manually forwarded. With that, would be good to have a syntax to block forwarding of a sub-part (currently would require `foo => nonsense-name`).
159
185
160
-
Note: It's okay to give a part multiple names,
161
-
or map a sub-part to several names.
162
-
The "part name" should be considered similar to a class,
163
-
not an id or tagname.
164
-
165
-
Each <a>shadow root</a> has a <dfn export for="shadow root">shadow part map</dfn>
166
-
which is an <a>ordered map</a>,
167
-
with keys that are [=strings=]
168
-
and values that are [=ordered sets=] of elements.
169
-
170
-
The <a>shadow part map</a> contains all the entries described by the elements in its <a>shadow tree</a>,
171
-
as described above.
186
+
Note: It's okay to map a sub-part to several names.
172
187
173
188
Exposing More Widely: the <{html-global/theme}> attribute {#theme-attr}
0 commit comments