mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-09 17:55:37 +02:00
Merge pull request #1967 from brendandahl/deatched-dom
Cleanup references to dom elements.
This commit is contained in:
commit
e17d828b64
2 changed files with 5 additions and 1 deletions
|
@ -1258,7 +1258,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() {
|
||||||
return CanvasGraphics;
|
return CanvasGraphics;
|
||||||
})();
|
})();
|
||||||
|
|
||||||
if (!isWorker) {
|
function checkPutBinaryImageDataCompatibility() {
|
||||||
// Feature detection if the browser can use an Uint8Array directly as imgData.
|
// Feature detection if the browser can use an Uint8Array directly as imgData.
|
||||||
var canvas = document.createElement('canvas');
|
var canvas = document.createElement('canvas');
|
||||||
canvas.width = 1;
|
canvas.width = 1;
|
||||||
|
@ -1293,3 +1293,6 @@ if (!isWorker) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!isWorker) {
|
||||||
|
checkPutBinaryImageDataCompatibility();
|
||||||
|
}
|
||||||
|
|
|
@ -1704,6 +1704,7 @@ var TextLayerBuilder = function textLayerBuilder(textLayerDiv) {
|
||||||
if (textDivs.length === 0) {
|
if (textDivs.length === 0) {
|
||||||
clearInterval(renderTimer);
|
clearInterval(renderTimer);
|
||||||
renderingDone = true;
|
renderingDone = true;
|
||||||
|
self.textLayerDiv = textLayerDiv = canvas = ctx = null;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var textDiv = textDivs.shift();
|
var textDiv = textDivs.shift();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue