Project

Profile

Help

Bug #2890

closed

document.createAttributeNS() deprecated - warning in Firefox

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

Status:
Closed
Priority:
Low
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

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 about 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 about 8 years ago

  • Status changed from In Progress to Resolved

Now marking as resolved as fixes seem fine.

Actions #3

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

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