Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda