I am aware that I could select all the elements on an HTML page, and I can check each element for a particular inline style, such as, background-image
. I see this article demonstrating how one can check every node in the DOM.
Without checking every single element and node in the DOM, is there any way that with either jQuery or vanilla JS I can query all elements that have an inline style property of background-image
?
I know this code example is a bit naive and of course it does not work but something like this document.querySelectorAll("[style='background-image: url(*)']")
if it worked would get me all the elements with a background-image
inline style property.