Project

Profile

Help

Feature #3462

closed

Asynchronous fetch for internal resources

Added by Debbie Lockett over 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Low
Category:
Internals
Sprint/Milestone:
-
Start date:
2017-09-28
Due date:
% Done:

100%

Estimated time:
Applies to JS Branch:
1.0, Trunk
Fix Committed on JS Branch:
Trunk
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

We currently use synchronous fetches for Saxon-JS internal resources: opt/functions.json used by function-available(); opt/categories.json used for some advanced regex; and lib/xpath/XPathJS.min.js. But we should use asynchronous fetches. We need to work out the best way to do this. Possible options:

  1. Require the developer to load the required resources, e.g. by providing an API method to be called in an HTML script.

  2. Read from the SEF that the resource will be needed, and fetch during initialisation (before starting the transform).

(1) is not ideal because this is adds work for the developer, when we did not previously require the use of such features to be stated up front. If resources are not correctly loaded then an application may break.

A problem with (2) is that we do not necessarily know at compile time that resources (e.g. categories.json) will be required.

Please register to edit this issue

Also available in: Atom PDF Tracking page