←back to thread

Element: setHTML() method

(developer.mozilla.org)
170 points todsacerdoti | 2 comments | | HN request time: 0.415s | source
Show context
codedokode ◴[] No.45677417[source]
I don't like this. This could be implemented as a JS library. I believe browsers should provide the minimal API so that they are smaller and easier to create. As for safe alternative to innerHTML, it is called innerText.
replies(3): >>45677474 #>>45677546 #>>45677680 #
1. petralithic ◴[] No.45677680[source]
> I believe browsers should provide the minimal API so that they are smaller and easier to create.

That ship has long since sailed. Browsers are so complex that it takes quite some effort to support the various levels of 9s of the percentage of compatibility with standards, not to mention the browser makers themselves define many of the standards.

replies(1): >>45677947 #
2. ◴[] No.45677947[source]