Bug #2890


document.createAttributeNS() deprecated - warning in Firefox

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

Start date:
Due date:
% Done:


Estimated time:
Applies to JS Branch:
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Contact person:
Additional contact persons:


In Firefox, there are a few warnings on the console on loading the Saxon-JS documentation:

  1. "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.

  1. "Use of setAttributeNodeNS() is deprecated. Use setAttributeNS() instead."

In the same sort of area?

Actions #1

Updated by Debbie Lockett almost 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.)

Actions #2

Updated by Debbie Lockett almost 8 years ago

  • Status changed from In Progress to Resolved

Now marking as resolved as fixes seem fine.

Actions #3

Updated by Debbie Lockett over 7 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 #4

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