Bug #3727
closedEdge browser problem for script elements dynamically added to page
100%
Description
Using the Windows Edge browser, the JS unit tests which add a script element to the HTML page (using xsl:result-document) are failing. i.e. tests ixsl2/interactive01, 02, 10, 11, 12. The tests work fine in Chrome, Firefox, and Safari.
The problem seems to be that although the script elements are added to the page, they are not executed. So the global methods that are defined in the new script elements are not found.
Updated by Debbie Lockett over 6 years ago
This isn't really a bug in Saxon-JS, but rather it seems that the tests misuse xsl:result-document. Inserting script elements using xsl:result-document will not work in all browsers, so it shouldn't be used (and I should add a warning to the documentation).
A work around is to use empty script elements (with IDs) in the skeleton HTML page, and then the content can be added by setting the textContent property of the script Node, using ixsl:set-property. Test interactive03 added to do this (and this works in Edge).
I also tried first adding the script elements and later setting the textContent (test interactive04); but this doesn't work in Edge either.
Updated by Debbie Lockett over 6 years ago
- Status changed from New to In Progress
An alternative work around, which is closer to the original: use empty script elements (with IDs) in the skeleton HTML page, and then use xsl:result-document to add the content. Test interactive05 added (and this works in Edge). This is more like the standard recommended mechanism for adding content to a skeletal HTML page using xsl:result-document.
Updated by Debbie Lockett over 6 years ago
- Status changed from In Progress to Resolved
- Fix Committed on JS Branch 1.0, Trunk added
A note has been added to the documentation (under development/result-documents) about dynamically adding script element content.
Updated by Debbie Lockett over 6 years ago
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in JS Release set to Saxon-JS 1.1.0
Bug fix applied in the Saxon-JS 1.1.0 maintenance release.
Please register to edit this issue
Also available in: Atom PDF Tracking page