Project

Profile

Help

Bug #2884

closed

Registering event listeners for objects outside DOM

Added by Debbie Lockett over 8 years ago. Updated over 7 years ago.

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

100%

Estimated time:
Applies to JS Branch:
0.9
Fix Committed on JS Branch:
0.9
Fixed in JS Release:
SEF Generated with:
Platforms:
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.

Actions #1

Updated by Debbie Lockett about 8 years 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.

Actions #2

Updated by Debbie Lockett about 8 years 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.

Actions #3

Updated by Community Admin over 7 years 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