@@ -16,6 +16,7 @@ Editor: Alan Stearns, Adobe Systems Inc., stearns@adobe.com, w3cid 46659
1616Abstract : This CSS module defines pseudo-elements, abstract elements that represent portions of the CSS render tree that can be selected and styled.
1717Ignored Terms : initial-letter, PseudoElement, pseudo(), selectors
1818Default Highlight : css
19+ Indent : 2
1920</pre>
2021<pre class="link-defaults">
2122spec:css-color-3; type:value; text:currentcolor
@@ -890,16 +891,32 @@ Additions to the CSS Object Model</h2>
890891 };
891892 </pre>
892893
893- The <dfn method for=Element title="pseudo(type)" id="dom-element-pseudo">pseudo(CSSOMString type)</dfn> method
894- is used to retrieve the {{CSSPseudoElement}} instance
895- of the type matching {{type!!argument}}
896- associated with the element.
897- Its return value on a given element
898- for a given, supported {{CSSPseudoElement}} {{CSSPseudoElement/type}} is,
899- insofar as observable, always the same {{CSSPseudoElement}} object.
894+ <div algorithm>
895+ The <dfn method for=Element title="pseudo(type)" id="dom-element-pseudo">pseudo(CSSOMString type)</dfn> method
896+ is used to retrieve the {{CSSPseudoElement}} instance
897+ of the type matching {{type!!argument}}
898+ associated with the element.
899+ When it is called,
900+ execute the following steps:
901+
902+ 1. [=CSS/Parse=] the {{type!!argument}} argument as a <<pseudo-element-selector>> ,
903+ and let |type| be the result.
904+
905+ 2. If |type| is failure,
906+ return null.
907+
908+ 3. Otherwise, return the {{CSSPseudoElement}} object
909+ representing the pseudo-element
910+ that would match the selector |type|
911+ with [=this=] as its [=originating element=] .
912+ </div>
913+
914+ Return values that represent the same [=pseudo-element=]
915+ on the same [=originating element=]
916+ must be, insofar as observable,
917+ always the same {{CSSPseudoElement}} object.
900918 (The UA may drop or regenerate the object for convenience or performance
901919 if this is not observable.)
902- For unrecognized types, the return value is null.
903920
904921 ISSUE: The identity, lifetime, and nullness of the return value
905922 (and potential error cases)
0 commit comments