mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #11569 from Snuffleupagus/rm-most-setAttribute
Replace most remaining `Element.setAttribute("style", ...)` usage with `Element.style = ...` instead
This commit is contained in:
commit
a73a38029c
6 changed files with 14 additions and 26 deletions
|
@ -341,12 +341,11 @@ if (typeof PDFJSDev !== "undefined" && PDFJSDev.test("MOZCENTRAL")) {
|
|||
names.push(loadTestFontId);
|
||||
|
||||
const div = document.createElement("div");
|
||||
div.setAttribute(
|
||||
"style",
|
||||
"visibility: hidden;" +
|
||||
"width: 10px; height: 10px;" +
|
||||
"position: absolute; top: 0px; left: 0px;"
|
||||
);
|
||||
div.style.visibility = "hidden";
|
||||
div.style.width = div.style.height = "10px";
|
||||
div.style.position = "absolute";
|
||||
div.style.top = div.style.left = "0px";
|
||||
|
||||
for (i = 0, ii = names.length; i < ii; ++i) {
|
||||
const span = document.createElement("span");
|
||||
span.textContent = "Hi";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue