1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

[api-minor] Move, most of, the isPureXfa-handling from PDFViewer and into PDFPageView

By moving this code the "pageviewer"-component example will become slightly more usable on its own, it may simplify a future addition of XFA Foreground document support, and finally also serves as preparation for the following patches.
This commit is contained in:
Jonas Jenwald 2022-12-06 13:38:19 +01:00
parent dd96ee1512
commit ded02941f2
3 changed files with 20 additions and 18 deletions

View file

@ -783,7 +783,7 @@ class PDFDocumentProxy {
* @type {boolean} True if only XFA form.
*/
get isPureXfa() {
return !!this._transport._htmlForXfa;
return shadow(this, "isPureXfa", !!this._transport._htmlForXfa);
}
/**
@ -1343,6 +1343,13 @@ class PDFPageProxy {
));
}
/**
* @type {boolean} True if only XFA form.
*/
get isPureXfa() {
return shadow(this, "isPureXfa", !!this._transport._htmlForXfa);
}
/**
* @returns {Promise<Object | null>} A promise that is resolved with
* an {Object} with a fake DOM object (a tree structure where elements