Project

Profile

Help

Bug #2884

Registering event listeners for objects outside DOM

Added by Debbie Lockett over 1 year ago. Updated 7 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
2016-08-18
Due date:
% Done:

100%

Applies to JS Branch:
0.9
Fix Committed on JS Branch:
0.9
Fixed in JS Release:
SEF Generated with:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

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.

History

#1 Updated by Debbie Lockett about 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 9.7.0.12.

#2 Updated by Debbie Lockett about 1 year ago

  • Status changed from Resolved to Closed
  • % Done changed from 0 to 100
  • Fixed in version set to 0.9.1

Bug fix applied in the Saxon-JS 0.9.1 beta release.

#3 Updated by Community Admin 7 months ago

  • Fixed in JS Release set to Saxon-JS 0.9.1
  • Applies to JS Branch 0.9 added
  • Fix Committed on JS Branch 0.9 added

Please register to edit this issue

Also available in: Atom PDF Tracking page