views:

141

answers:

1

Is there a simple rule-of-thumb to know approximately which browser versions and upward will be compatible with a given DOM level?

+2  A: 

You may use feature detection:

  • DOM-Events Level 2: document.implementation.hasFeature("Events", "2.0")
  • DOM-Core Level 2: document.implementation.hasFeature("Core", "2.0"))
  • DOM-XPath Level 3: document.implementation.hasFeature("XPath", "3.0")

Camp 1: Gecko (Firefox, Mozilla), WebKit (Safari, Chrome), Presto-based (Opera) browsers support DOM Core/Events/XPath Level 2, some of them support Level 3.0

Camp 2: Presto-based (Intenert Explorer) support DOM Level 0 (which is not a standard)

Hope this helps.

Worth noticing, there is Ample SDK Ajax GUI framework that enables DOM Level 2/3 in Internet Explorer as well as in other browsers by re-implementing it.

Sergey Ilinsky