什么“insertAdjacentHTML不会破坏现有的DOM”。意思? [英] What does "insertAdjacentHTML doesn't corrupt the existing DOM" mean?
本文介绍了什么“insertAdjacentHTML不会破坏现有的DOM”。意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
insertAdjacentHTML() doesn’t corrupt what’s already in the DOM.
我刚刚在Mozilla博客上看到了有关insertAdjacentHTML()实现的内容。这是什么意思?
I just read this on the Mozilla blog about the implementation of insertAdjacentHTML(). What does it mean ?
推荐答案
这意味着它不会将元素内的DOM序列化为HTML,附加新的HTML,然后从中生成一个新的DOM(这将创建新元素,破坏引用,事件处理程序等)。
It means it doesn't serialise the DOM inside the element to HTML, append the new HTML, then generate a new DOM from that (which would create new elements, breaking references, event handlers, etc).
这篇关于什么“insertAdjacentHTML不会破坏现有的DOM”。意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文