mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Ensure that the pdf.sandbox.js
scriptElement is also removed from the DOM (PR 12695 follow-up)
I completely missed this previously, but we obviously should remove the scriptElement as well to *really* clean-up everything properly. Given that there's multiple existing usages of `loadScript` in the code-base, the safest/quickest solution seemed to be to have call-sites opt-in to remove the scriptElement using a new parameter.
This commit is contained in:
parent
b194c820bf
commit
7ce6634c51
2 changed files with 12 additions and 3 deletions
|
@ -41,7 +41,10 @@ class GenericPreferences extends BasePreferences {
|
|||
|
||||
class GenericScripting {
|
||||
constructor() {
|
||||
this._ready = loadScript(AppOptions.get("sandboxBundleSrc")).then(() => {
|
||||
this._ready = loadScript(
|
||||
AppOptions.get("sandboxBundleSrc"),
|
||||
/* removeScriptElement = */ true
|
||||
).then(() => {
|
||||
return window.pdfjsSandbox.QuickJSSandbox();
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue