I've recently learned that using getComputedStyle in a Node environment is not possible due to it being a browser-specific behavior.
Despite this, I am still interested in retrieving all background image URLs within Node and downloading them as shown below
const divs = document.querySelectorAll("div");
Array.from(divs).filter((div) => {
let backgroundImage = window.getComputedStyle(div).getPropertyValue("background-image");
Unfortunately, this approach isn't feasible.
Is there a way to retrieve all div elements with background-image URLs as styles in NodeJS?