Registering event listeners for objects outside DOM
There is work to be done on the registerEventListeners method in transform.js.
We currently treat a 'hashchange' event as uniquely different: it is registered on the Window object, while all other events get registered on the Window.document. This is not the only event which should be registered outside the DOM.
Also, as documented, ixsl:event() "is not working fully in this Saxon-JS beta release", due to these problems.
#1 Updated by Debbie Lockett over 1 year ago
- Status changed from New to Resolved
Fix in registerEventListeners method of transform.js. WindowEventHandlers are registered on Window, while all others are registered on Window.document. There are just 14 WindowEventHandlers to consider ['afterprint', 'beforeprint', 'beforeunload', 'hashchange', 'languagechange', 'message', 'offline', 'online', 'pagehide', 'pageshow', 'popstate', 'storage', 'unhandledrejection', 'unload'] (see https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandlers), so this list can just be checked at the time the event listener is registered.
The possible problems with using ixsl:event() are actually unrelated; and due to issues with the SEF generated by Saxon-EE, rather than a bug in Saxon-JS. The fix is in the IxslFunctionLibrary, to register the functions as having side-effects where appropriate (including ixsl:event()). This has been fixed on the 9.7 and 9.8 branches, so the issue is resolved from Saxon-EE 184.108.40.206.
Please register to edit this issue