HtmlUnit/htmlunit-cssparser

Pseudo-elements

Closed this issue · 1 comments

Hello @rbri,
how detect pseudo-elements ::after ::before with htmlunit-cssparser

rbri commented

Hi Ivan,
long time not seen :-)

parsing "a:after"

  • creates an DESCENDANT_SELECTOR having
  • an ELEMENT_NODE_SELECTOR as getAncestorSelector()
  • an PSEUDO_ELEMENT_SELECTOR as getSimpleSelector() <- this is the pseudo one you are hopefully locking for

Hope you are fine
Ronald