reenbale the download action (#4299)

This commit is contained in:
LawyZheng
2025-12-15 14:30:32 +08:00
committed by GitHub
parent 6178a20824
commit ce717146f3
9 changed files with 208 additions and 37 deletions

View File

@@ -1794,6 +1794,16 @@ async function buildElementTree(
elementObj = await buildElementObject(frame, element, interactable);
} else if (tagName === "div" && isDOMNodeRepresentDiv(element)) {
elementObj = await buildElementObject(frame, element, interactable);
} else if (
tagName === "embed" &&
element.getAttribute("type")?.toLowerCase() === "application/pdf"
) {
elementObj = await buildElementObject(
frame,
element,
interactable,
true,
);
} else if (
getElementText(element).length > 0 &&
getElementText(element).length <= 5000