1

Should one choose to use DOM level 2 over DOM level 0? I'm unclear as to what the difference is between the two levels.

flashmatrix
  • 185
  • 1
  • 2
  • 6

1 Answers1

1

They are simply different versions of specification of the DOM - later browsers support higher "levels" of the DOM, with each level extending on the previous levels of the standard. As well as providing new features, new levels may introduce wrapper functions and allow interaction with the DOM to be easier.

DOM Level 0 isn't technically a standard level - it's used to refer to the original DOM by browser implementations at the time. It's better to use higher level functions where possible, unless you have browser support constraints that you need to meet.

Qantas 94 Heavy
  • 15,750
  • 31
  • 68
  • 83