Merge pull request #13209 from Snuffleupagus/rm-PDFPageView-enableScripting
Remove the `enableScripting` option from the `PDFPageView` constructor
This commit is contained in:
commit
0ae5a6ef05
@ -552,7 +552,6 @@ class BaseViewer {
|
|||||||
useOnlyCssZoom: this.useOnlyCssZoom,
|
useOnlyCssZoom: this.useOnlyCssZoom,
|
||||||
maxCanvasPixels: this.maxCanvasPixels,
|
maxCanvasPixels: this.maxCanvasPixels,
|
||||||
l10n: this.l10n,
|
l10n: this.l10n,
|
||||||
enableScripting: this.enableScripting,
|
|
||||||
});
|
});
|
||||||
this._pages.push(pageView);
|
this._pages.push(pageView);
|
||||||
}
|
}
|
||||||
@ -1296,7 +1295,7 @@ class BaseViewer {
|
|||||||
imageResourcesPath = "",
|
imageResourcesPath = "",
|
||||||
renderInteractiveForms = false,
|
renderInteractiveForms = false,
|
||||||
l10n = NullL10n,
|
l10n = NullL10n,
|
||||||
enableScripting = false,
|
enableScripting = null,
|
||||||
hasJSActionsPromise = null,
|
hasJSActionsPromise = null,
|
||||||
mouseState = null
|
mouseState = null
|
||||||
) {
|
) {
|
||||||
@ -1310,7 +1309,7 @@ class BaseViewer {
|
|||||||
linkService: this.linkService,
|
linkService: this.linkService,
|
||||||
downloadManager: this.downloadManager,
|
downloadManager: this.downloadManager,
|
||||||
l10n,
|
l10n,
|
||||||
enableScripting,
|
enableScripting: enableScripting ?? this.enableScripting,
|
||||||
hasJSActionsPromise:
|
hasJSActionsPromise:
|
||||||
hasJSActionsPromise || this.pdfDocument?.hasJSActions(),
|
hasJSActionsPromise || this.pdfDocument?.hasJSActions(),
|
||||||
mouseState: mouseState || this._scriptingManager?.mouseState,
|
mouseState: mouseState || this._scriptingManager?.mouseState,
|
||||||
|
@ -62,8 +62,6 @@ import { viewerCompatibilityParams } from "./viewer_compatibility.js";
|
|||||||
* total pixels, i.e. width * height. Use -1 for no limit. The default value
|
* total pixels, i.e. width * height. Use -1 for no limit. The default value
|
||||||
* is 4096 * 4096 (16 mega-pixels).
|
* is 4096 * 4096 (16 mega-pixels).
|
||||||
* @property {IL10n} l10n - Localization service.
|
* @property {IL10n} l10n - Localization service.
|
||||||
* @property {boolean} [enableScripting] - Enable embedded script execution.
|
|
||||||
* The default value is `false`.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const MAX_CANVAS_PIXELS = viewerCompatibilityParams.maxCanvasPixels || 16777216;
|
const MAX_CANVAS_PIXELS = viewerCompatibilityParams.maxCanvasPixels || 16777216;
|
||||||
@ -107,7 +105,6 @@ class PDFPageView {
|
|||||||
this.renderer = options.renderer || RendererType.CANVAS;
|
this.renderer = options.renderer || RendererType.CANVAS;
|
||||||
this.enableWebGL = options.enableWebGL || false;
|
this.enableWebGL = options.enableWebGL || false;
|
||||||
this.l10n = options.l10n || NullL10n;
|
this.l10n = options.l10n || NullL10n;
|
||||||
this.enableScripting = options.enableScripting === true;
|
|
||||||
|
|
||||||
this.paintTask = null;
|
this.paintTask = null;
|
||||||
this.paintedViewportMap = new WeakMap();
|
this.paintedViewportMap = new WeakMap();
|
||||||
@ -584,7 +581,7 @@ class PDFPageView {
|
|||||||
this.imageResourcesPath,
|
this.imageResourcesPath,
|
||||||
this.renderInteractiveForms,
|
this.renderInteractiveForms,
|
||||||
this.l10n,
|
this.l10n,
|
||||||
this.enableScripting,
|
/* enableScripting */ null,
|
||||||
/* hasJSActionsPromise = */ null,
|
/* hasJSActionsPromise = */ null,
|
||||||
/* mouseState = */ null
|
/* mouseState = */ null
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user