Open utterances-bot opened 4 years ago
This looks like exactly what I've been searching for, for my own Chrome Extension 😅. I created an account just to say thank you 😄.
Thanks a lot. This was great help for a core feature in my exif viewer browser extension. https://github.com/StigNygaard/xIFr You'll find a few modifications in my code. It is some months ago I did the coding, but as far as I remember this includes handling multiple background images in an element, including the start-element itself in search, and excluding invisible elements from search.
This is the cleanest code I've ever seen in my life, you're an inspiration thank you for teaching me so many new things!
我也在写一个 chrome 插件 会用到图片正在没有头绪, 非常感谢!
Get All Images in DOM (including background) | CRIMX BLOG
Quite useful if you are writing an browser extension or something. To get all the images in DOM there are actually three places we are going to look at:
element, background-image CSS…
https://blog.crimx.com/2017/03/09/get-all-images-in-dom-including-background-en/