mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 01:10:08 +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:
parent
38c82357b2
commit
af5789125f
5 changed files with 0 additions and 34 deletions
|
@ -261,12 +261,6 @@ class Toolbar {
|
|||
|
||||
// The temporary canvas is used to measure text length in the DOM.
|
||||
let canvas = document.createElement("canvas");
|
||||
if (
|
||||
typeof PDFJSDev === "undefined" ||
|
||||
PDFJSDev.test("MOZCENTRAL || GENERIC")
|
||||
) {
|
||||
canvas.mozOpaque = true;
|
||||
}
|
||||
let ctx = canvas.getContext("2d", { alpha: false });
|
||||
|
||||
await animationStarted;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue