Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

183
Views
Document evaluate method Strict mode error

First, JavaScript is not my specialty and this is a former developers code I'm trying to fix.

I'm upgrading some IE code that needs to run on Edge, Chrome... and I'm getting an issue with the following code block:

XMLDocument.prototype.selectNodes = function(cXPathString, xNode) {
                if( !xNode ) { xNode = this; }
                var oNSResolver = this.createNSResolver(this.documentElement);
                var aItems = this.evaluate(cXPathString, xNode, oNSResolver, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null);
                var aResult = [];
                for( var i = 0; i < aItems.snapshotLength; i++) {
                    aResult[i] = aItems.snapshotItem(i);
                }
                return aResult;
            }

The error I'm getting is: Exception: TypeError: 'caller', 'callee', and 'arguments' properties may not be accessed on strict mode functions or the arguments objects for calls to them at Function....

From what I've read I think it has something to do with the use of 'this' in the function or 'callee' is not defined in Strict mode? I tried to replace 'this' with document, which is the DOM Document but that didn't fix it.

I'm probably way off so any help would be appreciated.

Thanks, Scott.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!