Calixte Denizet
167ff1a7fc
JS -- Actions must be evaluated in global scope
...
* All the public properties of doc are injected into globalThis, in order to make them available through `this`
* Put event in the global scope too.
2020-12-17 22:01:45 +01:00
Calixte Denizet
8bff4f1ea9
In order to simplify m-c code, move some in pdf.js
...
* move set/clear|Timeout/Interval and crackURL code in pdf.js
* remove the "backdoor" in the proxy (used to dispatch event) and so return the dispatch function in the initializer
* remove listeners if an error occured during sandbox initialization
* add support for alert and prompt in the sandbox
* add a function to eval in the global scope
2020-12-17 15:03:26 +01:00
Calixte Denizet
6502ae889d
JS -- Send events to the sandbox from annotation layer
2020-12-15 16:28:47 +01:00
Calixte Denizet
2dfac4cb41
JS -- Fix events dispatchment and add tests
...
* dispatch event to take into account calculation order
* use a map for actions in Field
2020-11-10 17:26:29 +01:00
Calixte Denizet
8de98079ca
JS -- Implement doc object
...
* https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/js_api_reference.pdf#page=335
* it has all the properties/methods defined in the spec
* unimplemented methods are there but with an empty body to avoid exception when calling an undefined method
* implement zoom, zoomType, layout, pageNum, ...
2020-11-10 16:16:42 +01:00
Calixte Denizet
e76a96892a
JS - Add the basic architecture to be able to execute embedded js
2020-10-21 19:00:56 +02:00