Bug #2890
closeddocument.createAttributeNS() deprecated - warning in Firefox
100%
Description
In Firefox, there are a few warnings on the console on loading the Saxon-JS documentation:
- "Use of document.createAttributeNS() is deprecated. Use element.setAttributeNS() instead."
We previously added the context.createElement(uri, name) method (see transform.js) to overcome a similar issue for creating elements in the browser. Looks like we should be doing something similar for attributes.
- "Use of setAttributeNodeNS() is deprecated. Use setAttributeNS() instead."
In the same sort of area?
Updated by Debbie Lockett over 8 years ago
- Status changed from New to In Progress
Introduced a new type AttributeNode (rather like our existing NamespaceNode).
The reason for the warnings is that the Attr type has changed (it used to inherit from Node, but not since DOM4), as well as the methods available for constructing these. The underlying problem we face is that we want to construct attributes and later attach them to the DOM tree. However, DOM4 does not provide a way to do this (attributes can apparently now only be constructed by adding them directly to elements). By using the AttributeNode type we can get around this problem.
As suggested in 1, added context.createAttribute(uri, name) method (which constructs an AttributeNode).
(Changes committed to JS src under 9.8 dev, but leaving open to do some more testing.)
Updated by Debbie Lockett about 8 years ago
- Status changed from In Progress to Resolved
Now marking as resolved as fixes seem fine.
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.
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