33 ms·
Thankfully, `innerText` has been standardized by WhatWG for a while now [1]. Usually, it accomplishes what you want to do (lay text and have it be visible in th
by arciini 6y ago
Thankfully, `innerText` has been standardized by WhatWG for a while now [1]. Usually, it accomplishes what you want to do (lay text and have it be visible in that form) as well or better than `textContent`. As such, I generally use that today.
1. https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute https://html.spec.whatwg.org/multipage/dom.html#the-innertex...
- rendall 6y agoAnd, has been supported by all the browsers for years: https://caniuse.com/?search=innerText https://caniuse.com/?search=innerText I'm not sure why anyone would use `textContent` anymore. I think I had even forgotten that it exists.