@@ -121,7 +121,7 @@ as authors can use ''::part()'' without fear of accidental over-styling.
121121Exposing a Shadow Element: {#exposing}
122122=============================================================
123123Elements in a <a>shadow tree</a> may be exposed for styling by stylesheets outside the tree
124- using the part and partmap attributes.
124+ using the part and exposedparts attributes.
125125
126126Each element has a <dfn export for="element">part name list</dfn>
127127which is an [=ordered set=] of tokens.
@@ -133,8 +133,6 @@ with keys that are [=strings=]
133133and values that are [=ordered sets=] of [=strings=]
134134(part names that are selectable inside this element).
135135
136- Issue(w3c/csswg-drafts#2414): Document how the part name map will be exposed via IDL.
137-
138136Each <a>shadow root</a> can be thought of as having a <dfn export for="shadow root">part element map</dfn>
139137with keys that are [=strings=]
140138and values that are [=ordered sets=] of elements.
@@ -199,16 +197,16 @@ not an id or tagname.
199197</script>
200198</pre>
201199
202- Forwarding a Shadow Element: the <{html-global/partmap }> attribute {#partmap -attr}
200+ Forwarding a Shadow Element: the <{html-global/exposedparts }> attribute {#exposedparts -attr}
203201----------------------------------------------------------------------------------
204- Any element in a shadow tree can have a <dfn element-attr for=html-global>partmap </dfn> attribute.
202+ Any element in a shadow tree can have a <dfn element-attr for=html-global>exposedparts </dfn> attribute.
205203If the element is a shadow host,
206204this is used to allow styling of parts from hosts inside the <a>shadow tree</a>
207205by rules outside this the <a>shadow tree</a>
208206(as if they were elements in the same tree as the host,
209207named by a part attribute).
210208
211- The partmap attribute is parsed as a comma-separated list of part mappings.
209+ The exposedparts attribute is parsed as a comma-separated list of part mappings.
212210Each part mapping is one of:
213211
214212<dl class=switch>
@@ -233,7 +231,7 @@ Issue(w3c/csswg-drafts#2411): Decide whether to allow "ident1 => ident2 ident3 .
233231as shorthand for "ident1 ident2, ident1 ident3, ...".
234232
235233Issue(w3c/csswg-drafts#2411): Decide whether to allow wild-card forwarding,
236- e.g partmap ="button-* buttons".
234+ e.g exposedparts ="button-* buttons".
237235Consider excluding sub-parts that have been explicitly forwarded.
238236Consider a mechanism to exclude sub-parts without forwarding them.
239237
@@ -243,7 +241,7 @@ Consider a mechanism to exclude sub-parts without forwarding them.
243241</style>
244242
245243<template id="c-e-outer-template">
246- <c-e-inner <b> partmap ="innerspan textspan"</b> ></c-e-inner>
244+ <c-e-inner <b> exposedparts ="innerspan textspan"</b> ></c-e-inner>
247245</template>
248246
249247<template id="c-e-inner-template">
@@ -366,3 +364,15 @@ but never match additional <a>shadow-part pseudo-elements</a>.
366364 would select just the one button's label,
367365 ignoring any other labels.
368366</div>
367+
368+ Extensions to the {{Element}} Interface {#idl}
369+ ==============================================
370+
371+ We expose the `part` and `exposedparts` attributes as read/write string properties on Element.
372+
373+ <pre class=idl>
374+ partial interface Element {
375+ attribute DOMString part;
376+ attribute DOMString exposedParts;
377+ };
378+ </pre>
0 commit comments