Skip to content

Commit

Permalink
[cssom] Throw a TypeError when the pseudo-element passed to getComput…
Browse files Browse the repository at this point in the history
…edStyle is unknown or ::slotted.

Fixes w3c#2149
  • Loading branch information
emilio committed Apr 11, 2018
1 parent 115c803 commit caa72d0
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions cssom-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2769,16 +2769,18 @@ steps:
<ol>
<li>Let <var>doc</var> be <var>elt</var>'s <a>node document</a>.
<li>Let <var>obj</var> be <var>elt</var>.
<li>If <var>pseudoElt</var> is as an
<a>ASCII case-insensitive</a> match for
either ":before" or "::before" let
<var>obj</var> be the ''::before'' pseudo-element of
<var>elt</var>.
<li>If <var>pseudoElt</var> is as an
<a>ASCII case-insensitive</a> match for
either ":after" or "::after" let
<var>obj</var> be the ''::after'' pseudo-element of
<var>elt</var>.
<li>If <var>pseudoElt</var> is provided, and it's not the empty string, then:
<ol>
<li>If it is an <a>ASCII case-insensitive</a> match for a pseudo-element
that the UA supports, other than ''::slotted()'', let <var>obj</var>
be the given pseudo-element of <var>elt</var>.
Otherwise <a>throw</a> a {{TypeError}} exception.
</ol>

Note: CSS2 pseudo-elements should match both the double and single-colon
versions. That is, both <code>:before</code> and <code>::before</code> should
match above.

<li>
Return a live <a>CSS declaration block</a> with the following properties:
<dl>
Expand Down

0 comments on commit caa72d0

Please sign in to comment.