| Summary: | <object> fails to load same PDF twice | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Joe Woods <woods> |
| Component: | Assignee: | Nobody <webkit-unassigned> | |
| Status: | NEW --- | ||
| Severity: | Normal | CC: | achristensen, beidson, thorton, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
|
Description
Joe Woods
2022-05-26 07:27:05 PDT
This reproduces for me with macOS 12.5 beta.
Looks like <object> gets a zero length PDF every time except the first load.
document.getElementById("add").onclick = function () {
const pdf = document.getElementById("pdf");
if (pdf) {
pdf.parentNode.removeChild(pdf);
}
const newPdf = document.createElement("object");
newPdf.setAttribute("data", "/dummy.pdf");
newPdf.setAttribute("type", "application/pdf");
newPdf.setAttribute("id", "pdf");
document.body.appendChild(newPdf);
}
|