JS: nashorn references in core (browser) code
Domutuils.copyItem()#81 refers to @cloneNode()@, which is defined in @nashorn/xmldom/dom.js@. When running under a browser nashorn is not loaded, and if so would probably produce conflict as it use node constructors.
Will investigate further.
#1 Updated by Debbie Lockett over 2 years ago
I'm aware of this issue with Node.cloneNode() too, but haven't worked out a solution yet. The browser DOM version of Node does have a cloneNode() method but it takes one argument. The nashorn version we're using takes 3 arguments, and does a bit more in setting the parent document (if I remember correctly). I was hoping to make a change to just use the one arg version for any platform (browser or nashorn or whatever), but haven't quite worked out how to do that/ where changes are needed.
#3 Updated by Debbie Lockett over 2 years ago
- Status changed from New to Resolved
Closing, since these issues were actually resolved before the Saxon-JS 0.9 beta release. Note that:
in a number of places the use of Node.cloneNode() was replaced by Document.importNode() since this was actually better
since this bug was raised, we added checks on the platform (i.e. in browser or not) where relevant to allow for DOM differences, etc.
Please register to edit this issue