3 ms·
The `textContent` setter also does this. E.g. you can do this: const span = document.createElement('span') span.textContent = text return span.inne
by felixfbecker 5y ago
The `textContent` setter also does this. E.g. you can do this:
const span = document.createElement('span')
span.textContent = text
return span.innerHTML
- czechdeveloper 5y agoThis does not handle quotes as far as I remember