Working with CSS Pseudo-elements and JavaScript

Have a look at this page's source code to see the additions to the DOM for working with pseudo-elements.

window.getPseudoElements(element, type) can be used to get a list of an element's pseudo-elements where:

The demo works correctly if both the 'control' and 'pseudo-elements' sections look exactly the same. Take a look at the source code.

Control

123 - ABC

Pseudo-elements

-