[csswg-drafts] [css-pseudo-4] Identity of Element.pseudo() return value (#3607)

fantasai has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-pseudo-4] Identity of Element.pseudo() return value ==
@heycam wrote in https://github.com/w3c/csswg-drafts/issues/3541#issuecomment-459936846

<hr>

We need some wording about the identity of the object returned by `pseudo()`, for example whether it's required to be the same object each time you call it on an element with a given type.

Now that I think about it, if we do require that the same object is returned, what does it mean for the `CSSPseudoElement` object if we restyle the element and the pseudo goes away (and so `null` would be returned from another call to `pseudo()`)?  Is the `CSSPseudoElement` detached in some way?  If we restyle again and the pseudo-element is recreated, does the old `CSSPseudoElement` remain functional?  Might it be simpler to always return an object for a supported pseudo type, regardless of whether the pseudo currently exists?


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3607 using your GitHub account

Received on Saturday, 2 February 2019 07:14:08 UTC