开发者

Does document reload every time DOM changes via Javascript?

开发者 https://www.devze.com 2023-02-28 22:53 出处:网络
I kind of have a newbie question. I\'ve 开发者_C百科done some testing, but I didn\'t get anything solid, so does the whole document reload when DOM is updated?No, the document is not reloaded when the

I kind of have a newbie question. I've 开发者_C百科done some testing, but I didn't get anything solid, so does the whole document reload when DOM is updated?


No, the document is not reloaded when the DOM is updated.

You can test it using this example: http://jsfiddle.net/AATC6/

There is an alert in the load event for the page, and you can click on the link to add an element to the DOM, which does not cause the load event to be triggered.


No it does not. However there is an event for some browsers DOMSubtreeModified which can be used to track changes to the DOM.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号