Use of 'innerHTML' property

Last modified: 03 December 2024

Reports a JavaScript access to DOM nodes as text using the innerHTML property. Most usages of innerHTML are performed better with explicit DOM calls, such as getElementByID() and createElement(). Additionally, innerHTML will not work with XML DOMs, including DOMs for XHTML if viewed as XML. This can lead to difficulties in diagnosing bugs.