Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
domenicd
3 months ago
|
parent
|
context
|
favorite
| on:
Element: setHTML() method
Indeed, the web platform now has setHTML() and setHTMLUnsafe() to replace the innerHTML setter.
There's also getHTML() (which has extra capabilities over the innerHTML getter).
meowface
3 months ago
[–]
Okay, I've changed my mind and agree this is better, then. I wasn't aware they were adding two new methods. That is the safest way to do it.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
There's also getHTML() (which has extra capabilities over the innerHTML getter).