Skip to content

Add part attribute and note that part and exportparts are superglobal #1372

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions dom.bs
Original file line number Diff line number Diff line change
Expand Up @@ -6514,6 +6514,7 @@ interface Element : Node {
[CEReactions] attribute DOMString className;
[SameObject, PutForwards=value] readonly attribute DOMTokenList classList;
[CEReactions, Unscopable] attribute DOMString slot;
[SameObject, PutForwards=value] readonly attribute DOMTokenList part;

boolean hasAttributes();
[SameObject] readonly attribute NamedNodeMap attributes;
Expand Down Expand Up @@ -7152,6 +7153,10 @@ claims as to whether using them is conforming or not.
<dt><code><var>element</var> . <a attribute for=Element>slot</a> [ = <var>value</var> ]</code>
<dd><p>Returns the value of <var>element</var>'s <code>slot</code> content attribute. Can be set to
change it.

<dt><code><var>element</var> . <a attribute for=Element>part</a></code>
<dd><p>Allows for manipulation of <var>element</var>'s <code>part</code> content attribute as a
set of whitespace-separated tokens through a {{DOMTokenList}} object.
</dl>

<p>IDL attributes that are defined to <dfn for=Attr id=concept-reflect>reflect</dfn> a string
Expand Down Expand Up @@ -7182,9 +7187,14 @@ particular {{DOMTokenList}} object are also known as the <a for=/>element</a>'s
<p>The <dfn attribute for=Element><code>slot</code></dfn> attribute must <a for=Attr>reflect</a>
"<code>slot</code>".

<p class=note><code>id</code>, <code>class</code>, and <code>slot</code> are effectively
superglobal attributes as they can appear on any element, regardless of that element's
namespace.</p>
<p>The <dfn attribute for=Element><code>part</code></dfn> getter steps are to return a
{{DOMTokenList}} object whose associated <a for=/>element</a> is <a>this</a> and whose associated
<a>attribute</a>'s <a for=Attr>local name</a> is <code>part</code>. The <a>token set</a> of this
particular {{DOMTokenList}} object are also known as the <a for=/>element</a>'s parts.

<p class=note><code>id</code>, <code>class</code>, <code>slot</code>, <code>part</code>, and
<code>exportparts</code> are effectively superglobal attributes as they can appear on any element,
regardless of that element's namespace.</p>

<hr>

Expand Down Expand Up @@ -10836,6 +10846,7 @@ Chris Rebert,
Cyrille Tuzi,
Dan Burzo,
Daniel Clark,
Daniel Ethridge, <!-- wlib on GitHub -->
Daniel Glazman,
Darien Maillet Valentine<!-- bhathos; GitHub -->,
Darin Fisher,
Expand Down