Skip to content

Commit a655afd

Browse files
committed
[css-pseudo-4] Define CSSPseudoElement.parent (vs CSSPseudoElement.element) for sub-pseudo-elements w3c#3836
1 parent f9bc45f commit a655afd

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

css-pseudo-4/Overview.bs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,7 @@ Additions to the CSS Object Model</h2>
11931193
interface CSSPseudoElement : EventTarget {
11941194
readonly attribute CSSOMString type;
11951195
readonly attribute Element element;
1196+
readonly attribute (Element or CSSPseudoElement) parent;
11961197
};
11971198
</pre>
11981199

@@ -1214,7 +1215,16 @@ Additions to the CSS Object Model</h2>
12141215
</dl>
12151216

12161217
The <dfn attribute for=CSSPseudoElement>element</dfn> attribute is the
1218+
[=ultimate originating element=] of the [=pseudo-element=].
1219+
1220+
The <dfn attribute for=CSSPseudoElement>parent</dfn> attribute is the
12171221
[=originating element=] of the pseudo-element.
1222+
For most pseudo-elements
1223+
{{CSSPseudoElement/parent}} and {{CSSPseudoElement/element}}
1224+
will return the same {{Element}};
1225+
for [=sub-pseudo-elements=],
1226+
{{CSSPseudoElement/parent}} will return a {{CSSPseudoElement}}
1227+
while {{CSSPseudoElement/element}} returns an {{Element}}.
12181228

12191229
Note: This interface may be extended in the future
12201230
to other pseudo-element types

0 commit comments

Comments
 (0)