Похожие чаты

So I found insertAdjacentHTML . Is this still as terrible

as innerHTML ?
The only security considerations it has are:
"When inserting HTML into a page by using insertAdjacentHTML(), be careful not to use user input that hasn't been escaped.

It is not recommended you use insertAdjacentHTML() when inserting plain text; instead, use the Node.textContent property or the Element.insertAdjacentText() method. This doesn't interpret the passed content as HTML, but instead inserts it as raw text."

8 ответов

33 просмотра

Yup.. It is as terrible

Hossein- Автор вопроса
Hossein
Damn

Oh.. I've just read the conversation above..

The problem isn't "which API is good for inserting HTML", the problem is "inserting HTML as your main way of building up webpage content dynamically" is bad

Похожие вопросы

Обсуждают сегодня

Карта сайта