Advantages of DOM level 2 over DOM level 0?

Should you decide to use the DOM level 2 above the DOM level 0? I don’t understand what is the difference between these two levels.

+1
source share
1 answer

These are simply different versions of the DOM specification β€” later browsers support higher β€œlevels” of the DOM, with each level extending to previous levels of the standard. Along with the provision of new functions, new levels can introduce wrapper functions and facilitate interaction with the DOM.

DOM level 0 is not technically the standard level - at that time it referred to the original DOM by browser version. It is better to use higher-level features, if possible, if you do not have restrictions on browser support that you need to meet.

+1
source

Source: https://habr.com/ru/post/1233818/


All Articles