1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-24 09:08:07 +02:00

Try to remove the mozOpaque canvas-property (PR 6551 follow-up)

According to MDN, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/mozOpaque, the `mozOpaque` canvas-property is not only non-standard (obviously) but it's also been deprecated.
Instead it's recommended to use `alpha = false` when getting the canvas-context, see https://developer.mozilla.org/en-US/docs/Web/API/HTMLCanvasElement/getContext#contextattributes, which all of our affected code is already doing.
This commit is contained in:
Jonas Jenwald 2022-05-09 12:25:51 +02:00
parent 38c82357b2
commit af5789125f
5 changed files with 0 additions and 34 deletions

View file

@ -607,7 +607,6 @@ class Driver {
this._log(
" Loading page " + task.pageNum + "/" + task.pdfDoc.numPages + "... "
);
this.canvas.mozOpaque = true;
ctx = this.canvas.getContext("2d", { alpha: false });
task.pdfDoc.getPage(task.pageNum).then(
page => {