Any cross browser issues with document.documentElement

前端 未结 2 337
臣服心动
臣服心动 2020-12-31 00:34

Any cross browser issues if I use document.documentElement ?

Target browsers are

  • Firefox
  • Internet Explorer
  • Opera
  • Safari
相关标签:
2条回答
  • 2020-12-31 01:17

    You should have no problems: http://www.quirksmode.org/dom/w3c_core.html

    Anyway here you have a test page: http://www.quirksmode.org/dom/tests/document.html#documentElement

    0 讨论(0)
  • 2020-12-31 01:32

    Quirksmode says

    document.documentElement.clientWidth/Height

    • Meaning: Viewport dimensions Measured in CSS pixels
    • Browser errors: None

    http://duckduckgo.com/?q=!%20document.documentElement%20site%3Aquirksmode.org

    0 讨论(0)
提交回复
热议问题