Skip to content

Commit

Permalink
Fix leanderseige#2 - workaround for DOM method remove() which is not …
Browse files Browse the repository at this point in the history
…supported by IE11
  • Loading branch information
lutzhelm committed Jun 29, 2018
1 parent 64055a1 commit 8a2b47e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion iiif2pdf.js
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,9 @@ function iiif2pdf(config) {
var ctx = canvas.getContext("2d")
ctx.drawImage(img,0,0)
var retimg = canvas.toDataURL('image/jpeg',q)
canvas.remove()
if (canvas.parentNode != null) {
canvas.parentNode.removeChild(canvas);
}
return retimg
}

Expand Down

0 comments on commit 8a2b47e

Please sign in to comment.