Is there any way to change the underlying function of innerHTML()
so a custom function will be responsible to add things to the DOM? Is there a way to change the prototype function of innerHTML()
?
The reason I ask is because the Samsung TV's do not like when innerHTML()
is used. Instead, Samsung suggests using their own API to write to the DOM. However, it would be nice if my app's codebase can be used across other non-Samsung platforms. So it would be ideal if I could change how innerHTML()
works in one JS file so it uses the Samsung function, rather than creating conditional statements throughout the code. Plus, since I am using jquery, it would be nice if I can affect innerHTML()
directly since jquery also uses innerHTML()
.