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

Merge pull request #13995 from calixteman/xfa_record

XFA - Handle $record shorcut in SOM expression (issue #13994)
This commit is contained in:
calixteman 2021-09-10 13:57:50 +02:00 committed by GitHub
commit 57b80074a2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View file

@ -15,6 +15,7 @@
import {
$appendChild,
$getChildren,
$getChildrenByClass,
$getChildrenByName,
$getParent,
@ -37,7 +38,12 @@ const operators = {
};
const shortcuts = new Map([
["$data", (root, current) => root.datasets.data],
["$data", (root, current) => (root.datasets ? root.datasets.data : root)],
[
"$record",
(root, current) =>
(root.datasets ? root.datasets.data : root)[$getChildren]()[0],
],
["$template", (root, current) => root.template],
["$connectionSet", (root, current) => root.connectionSet],
["$form", (root, current) => root.form],