Skip to content

Commit 3a82041

Browse files
Define .selectorText for CSSPseudoElement IDL
As resolved in w3c#12161, add .selectorText property to return a string representing the full, normalized selector text used to select the pseudo-element.
1 parent fdc08f7 commit 3a82041

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

css-pseudo-4/Overview.bs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,6 +1760,7 @@ Additions to the CSS Object Model</h2>
17601760
readonly attribute CSSOMString type;
17611761
readonly attribute Element element;
17621762
readonly attribute (Element or CSSPseudoElement) parent;
1763+
readonly attribute CSSOMString selectorText;
17631764
CSSPseudoElement? pseudo(CSSOMString type);
17641765
};
17651766
</pre>
@@ -1793,6 +1794,15 @@ Additions to the CSS Object Model</h2>
17931794
{{CSSPseudoElement/parent}} will return a {{CSSPseudoElement}}
17941795
while {{CSSPseudoElement/element}} returns an {{Element}}.
17951796

1797+
The <dfn attribute for=CSSPseudoElement>selectorText</dfn> attribute
1798+
is a string representing the full, normalized selector text
1799+
used to select the pseudo-element.
1800+
This includes the pseudo-element name and any arguments,
1801+
serialized in a form that can round-trip.
1802+
For example, <code>"::after"</code> for a ''::after'' pseudo-element,
1803+
or <code>"::scroll-button(left)"</code> for a ''::scroll-button()'' pseudo-element
1804+
with a <code>left</code> argument.
1805+
17961806
The <dfn attribute for=CSSPseudoElement>pseudo(type)</dfn> method
17971807
returns the {{CSSPseudoElement}} interface
17981808
representing the [=sub-pseudo-element=] referenced in its argument,

0 commit comments

Comments
 (0)