DocumentFragment browser support

后端 未结 3 1970
名媛妹妹
名媛妹妹 2021-01-12 01:58

Today I stumbled on createDocumentFragment. I was wondering if the DocumementFragment is supported, and how, on the different browsers, expecially IE series.

Anyone

3条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-12 02:36

             ╔═════════════════════════════════╗
             ║ document.createDocumentFragment ║
    ╔════════╬═════════════════════════════════╣
    ║ IE5    ║ true                            ║
    ║ IEM5.2 ║ true                            ║
    ║ IE5.5  ║ false                           ║
    ║ IE6+   ║ true                            ║
    ║ OPM6+  ║ true                            ║
    ║ OP7+   ║ true                            ║
    ║ N6+    ║ true                            ║
    ║ KQ     ║ true                            ║
    ╚════════╩═════════════════════════════════╝
    

    Beware though, existence doesn't always entails implementation.

    Gotchas

    • IE Mac 5.2 on Mac cannot add text nodes to document fragments, nor append the fragment's contents to a document.
    • Opera 7.2 creates the fragment but does not apply styles to the created elements.

提交回复
热议问题