How DOM works/is loaded? (in HTML)

给你一囗甜甜゛ 提交于 2019-12-08 06:06:59

问题


How DOM is loaded in a html page? First is load the all html tag ( ) and inside of this element is created an other element and so on or first is create followed by ... and finally, the closing tags are added?

Thank you!


回答1:


More or less. The HTML 5.2 specification has a parsing algorithm.




回答2:


Generally the whole DOM is loaded into the memory, the order in which the elements are created is internal to the parser implementation and is not exposed.

If you need to parse as document loads you have to use SAX parsers



来源:https://stackoverflow.com/questions/3423864/how-dom-works-is-loaded-in-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!