---
title: " 解决ie9 不支持extjs3.3对象的 “createContextualFragment”属性或方法"
author: "duobility"
date: "2012-02-07T10:10:23Z"
tags: []
categories: ["Web前端"]
slug: "ie9-extjs3-3-createcontextualfragment"
draft: false
lastmod: "2012-02-07T10:12:26Z"
id: 1396269
url: "https://duobility.iteye.com/blog/1396269"
---

在页面中添加如下Js代码即可

```
if ((typeof Range !== "undefined") && !Range.prototype.createContextualFragment) {
         Range.prototype.createContextualFragment = function (html) {
             var frag = document.createDocumentFragment(),
            div = document.createElement("div");
             frag.appendChild(div);
             div.outerHTML = html;
             return frag;
         };
     }
```

  原文：http://www.sencha.com/forum/showthread.php?125869-Menu-shadow-probolem-in-IE9&p=579336