insertadjacenthtml
Reactive icon

InsertAdjacentHTML

Stable version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 6 Dec (19 hours ago)
 by 
0.0
 (0 ratings)
insertadjacenthtml

InsertAdjacentHTML

Documentation
1.0.0

insertAdjacentHTML() is a built-in JavaScript DOM method that allows you to insert HTML content into a document at a specific position relative to an existing element without removing existing elements or event handlers.

It is a safer and more performant alternative to innerHTML in most real-world applications.

element.insertAdjacentHTML(position, htmlString);


Safe Use:

  • Use only trusted server content

  • Or sanitize before inserting

  • Or use DOM creation methods