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

149
Views
No se pudo ejecutar 'createNodeIterator' en 'Documento': el parámetro 1 no es del tipo 'Nodo'. - lwc

Estoy trabajando con componentes web lightning (lwc) de Salesforce.

Estoy tratando de cargar esta biblioteca como recurso estático para usarla en uno de mis componentes, para desinfectar algunos datos -> DOMPurify . Estoy usando solo el archivo min js.

 import { loadStyle, loadScript } from 'lightning/platformResourceLoader'; import DOMPURIFY from '@salesforce/resourceUrl/DOMPurifyMin' export default class classNameHere extends LightningElement { DOMPurifyInitialized = false renderedCallback() { if (this.DOMPurifyInitialized) { return; } this.DOMPurifyInitialized = true; Promise.all([ loadScript(this, DOMPURIFY) ]) .then(() => { this.initDOMPurify() }) .catch((error) => { this.dispatchEvent( new ShowToastEvent({ title: 'Error loading this', message: error.message, variant: 'error' }) ); }); } initDOMPurify() { console.log('inside initDom') console.log(DOMPurify.sanitize(`<img src=x onerror=alert(1)//>`)) } }

Puedo llegar a initDOMPurify, pero luego falla en ese segundo console.log() que usa DOMPurify.

Mensaje de error en el bloque catch: No se pudo ejecutar 'createNodeIterator' en 'Documento': el parámetro 1 no es del tipo 'Nodo'.

¿Algunas ideas? No he encontrado mucha información sobre este tipo de error.

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!