zoukankan      html  css  js  c++  java
  • ie9,10 uploadify cleanUp bug

    起因:ie多次加载uploadify3.2版本这个组件的时候,出现了SCRIPT5007: 缺少对象.

     
    方法:
    源代码:
    SWFUpload.prototype.cleanUp = function(a) {
        try {
            if (this.movieElement && typeof(a.CallFunction) === "unknown") {
                this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
                for (var c in a) {
                    try {
                        if (typeof(a[c]) === "function") {
                            a[c] = null
                        }
                    } catch(b) {}
                }
            }
        } catch(d) {}
        window.__flash__removeCallback = function(e, f) {
            try {
                if (e) {
                    e[f] = null
                }
            } catch(g) {}
        }
    };
     
    修正代码:
    SWFUpload.prototype.cleanUp = function(f) {
        try {
            if (this.movieElement && typeof(f.CallFunction) === "unknown") {
                this.debug("Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)");
                for (var h in f) {
                    try {
                        if (typeof(f[h]) === "function" && h[0] >= 'A' && h[0] <= 'Z') {
                            f[h] = null;
                        }
                    } catch(e) {
     
    }
                }
            }
        } catch(g) {
     
    }
     
        window.__flash__removeCallback = function(c, b) {
            try {
                if (c) {
                    c[b] = null;
                }
            } catch(a) {}
        };
    };
  • 相关阅读:
    SQL执行效率1
    php经典算法(转载)
    linux自用命令
    vim基本命令
    xampp安装
    BUU-rsa
    z3约束器学习笔记
    面试前夕oi挣扎式复习
    bss上的格式化字符串漏洞
    一、汇编
  • 原文地址:https://www.cnblogs.com/zhgblog/p/4288665.html
Copyright © 2011-2022 走看看