Skip to content

Commit ced9212

Browse files
Define .selectorText for CSSPseudoElement IDL (#13169)
As resolved in #12161, add .selectorText property to return a string representing the full, normalized selector text used to select the pseudo-element.
1 parent 789c8e9 commit ced9212

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
@@ -1792,6 +1792,7 @@ Additions to the CSS Object Model</h2>
17921792
readonly attribute CSSOMString type;
17931793
readonly attribute Element element;
17941794
readonly attribute (Element or CSSPseudoElement) parent;
1795+
readonly attribute CSSOMString selectorText;
17951796
CSSPseudoElement? pseudo(CSSOMString type);
17961797
};
17971798
</pre>
@@ -1829,6 +1830,15 @@ Additions to the CSS Object Model</h2>
18291830
{{CSSPseudoElement/parent}} will return a {{CSSPseudoElement}}
18301831
while {{CSSPseudoElement/element}} returns an {{Element}}.
18311832

1833+
The <dfn attribute for=CSSPseudoElement>selectorText</dfn> attribute
1834+
is a string representing the full, normalized selector text
1835+
used to select the pseudo-element.
1836+
This includes the pseudo-element name and any arguments,
1837+
serialized in a form that can round-trip.
1838+
For example, <code>"::after"</code> for a ''::after'' pseudo-element,
1839+
or <code>"::scroll-button(left)"</code> for a ''::scroll-button()'' pseudo-element
1840+
with a <code>left</code> argument.
1841+
18321842
The <dfn attribute for=CSSPseudoElement>pseudo(type)</dfn> method
18331843
returns the {{CSSPseudoElement}} interface
18341844
representing the [=sub-pseudo-element=] referenced in its argument,

0 commit comments

Comments
 (0)