aboutsummaryrefslogtreecommitdiff
path: root/src/Main.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.tsx')
-rw-r--r--src/Main.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Main.tsx b/src/Main.tsx
index 78e1a8af6..aae35aa36 100644
--- a/src/Main.tsx
+++ b/src/Main.tsx
@@ -46,7 +46,7 @@ document.addEventListener("pointerdown", action(function (e: PointerEvent) {
let doc3 = Documents.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", {
x: 450, y: 500, title: "cat 1"
});
- console.log(CompileScript("function testFunc(doc: Document): any {return doc.GetNumberField(KeyStore.X, 0)} ")());
+ console.log("script: " + CompileScript("(function(doc: Document): any {return doc.GetNumberField(this.KeyStore.X, 0)})")()(doc3));
const schemaDocs = Array.from(Array(5).keys()).map(v => Documents.ImageDocument("https://upload.wikimedia.org/wikipedia/commons/thumb/3/3a/Cat03.jpg/1200px-Cat03.jpg", {
x: 50 + 100 * v, y: 50, width: 100, height: 100, title: "cat" + v
}));