Reapply "Reapply "fix: backgroundUrls 从 const 改为 let,允许 SVG 赋值""
This reverts commit 4bc747201f.
This commit is contained in:
@@ -944,7 +944,7 @@
|
|||||||
const children = [];
|
const children = [];
|
||||||
const imageCandidates = getElementImageCandidates(element);
|
const imageCandidates = getElementImageCandidates(element);
|
||||||
const currentSrc = imageCandidates[0] || null;
|
const currentSrc = imageCandidates[0] || null;
|
||||||
const backgroundUrls = extractStyleImageUrls(styles);
|
let backgroundUrls = extractStyleImageUrls(styles);
|
||||||
|
|
||||||
if (/^(IMG|VIDEO|SOURCE|PICTURE)$/i.test(element.tagName)) {
|
if (/^(IMG|VIDEO|SOURCE|PICTURE)$/i.test(element.tagName)) {
|
||||||
for (const url of imageCandidates) {
|
for (const url of imageCandidates) {
|
||||||
|
|||||||
Reference in New Issue
Block a user