Is there a way to retrieve the content of a DOM element's ::before
pseudo-element that was applied using CSS3?
I've attempted several methods without success, and I'm feeling very confused!
// https://rollbar.com/docs/
const links = document.querySelectorAll(`ul.image-list a`);
links[0];
// <a href="/docs/notifier/rollbar-gem/" class="ruby">::before Ruby</a>
links[0];
//
links[0].textContent;
//"Ruby"
links[0].innerText;
// "Ruby"
links[0].innerHTML;
// "Ruby"
// ??? links[0]::before;
Here is the scenario: