What are DOM levels?

前端 未结 6 1288
感情败类
感情败类 2021-01-30 10:54

I\'ve heard DOM level 2 and DOM level 3 mentioned in previous posts. Are these abstract constructs like the ISO OSI model which has layers 1-7 but are only loosely followed?

6条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-30 11:16

    DOM Levels are essentially versions.

    DOM Level 1 defines the core elements of the Document Object Model. DOM Level 2 extends those elements and adds events. DOM Level 3 extends DOM lvl 2 and adds more elements and events.

    Each new level of the DOM adds or changes specific sets of features. When browsers are said to be DOM Level X compliant developers can (hopefully) assume that the browser correctly handles the specified DOM api calls.

提交回复
热议问题