Bug Tracker

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#15151 closed bug (fixed)

msxml2.domdocument error with jQuery 2

Reported by: Ianchi Owned by: gibson042
Priority: low Milestone: 2.2
Component: manipulation Version: 2.1.1
Keywords: msxml2 Cc:
Blocked by: Blocking:

Description

There is an error when using msxml2.domdocument wrapped on jQuery 2.x. It Works fine with jQquery 1.x

The problematic code can be found in http://jsfiddle.net/Ufh8y/14/ and is as follows:

var xmlDoc = $(new ActiveXObject("msxml2.domdocument.6.0"));
xmlDoc.get(0).appendChild(xmlDoc.get(0).createNode(1,"ConnectionString",""))
xmlDoc.find("ConnectionString").each(function () {
     $(this).text("test");
  });

When run in IE11 with jQuery 1.x it works OK but in jQuery 2.x I get the following error:

SCRIPT450: Wrong number of arguments or invalid property assignment File: jquery-git2.js, Line: 4994, Column: 2

The problema seems to be when it trys for the existance of the method "getElementsByTagName"

var ret = context.getElementsByTagName ? ....

this raises an error which is no longer trapped in v2.

Thanks

Change History (3)

comment:1 Changed 5 years ago by gibson042

Component: unfiledmanipulation
Owner: set to gibson042
Priority: undecidedlow
Status: newassigned

Introduced by https://github.com/jquery/jquery/commit/25712d77c3bc0221b5b2b9b9492c20a9cfbe1b17... seems like IE11 still hangs on to some host object sins from the past.

comment:2 Changed 5 years ago by gibson042

Resolution: fixed
Status: assignedclosed

comment:3 Changed 5 years ago by gibson042

Milestone: None2.2
Note: See TracTickets for help on using tickets.