mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
[Annotations] Some annotations can have their values stored in the xfa:datasets
- it aims to fix #14685; - add a basic object to get values from the parsed datasets; - these annotations don't have an appearance so we must create one when printing or saving.
This commit is contained in:
parent
d6592b5e37
commit
0b597304c1
6 changed files with 178 additions and 13 deletions
|
@ -328,6 +328,10 @@ class SimpleDOMNode {
|
|||
.join("");
|
||||
}
|
||||
|
||||
get children() {
|
||||
return this.childNodes || [];
|
||||
}
|
||||
|
||||
hasChildNodes() {
|
||||
return this.childNodes && this.childNodes.length > 0;
|
||||
}
|
||||
|
@ -492,11 +496,12 @@ class SimpleXMLParser extends XMLParserBase {
|
|||
this._currentFragment = this._stack.pop() || [];
|
||||
const lastElement = this._currentFragment[this._currentFragment.length - 1];
|
||||
if (!lastElement) {
|
||||
return;
|
||||
return null;
|
||||
}
|
||||
for (let i = 0, ii = lastElement.childNodes.length; i < ii; i++) {
|
||||
lastElement.childNodes[i].parentNode = lastElement;
|
||||
}
|
||||
return lastElement;
|
||||
}
|
||||
|
||||
onError(code) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue