yibu239 / dropthings

Automatically exported from code.google.com/p/dropthings
0 stars 0 forks source link

ie 9 visit dropthings, fast rss widget cannot load rss content #211

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ie 9 visit dropthings, fast rss widget error. caused by ensure.js is not 
compatible ie 9.

What is the expected output? What do you see instead?
rss cannot be loaded.

What version of the product are you using? On what operating system?
2.7.5 ie 9 + windows 7

Please provide any additional information below.

Since ie 9 support both 'onload' and 'onreadystatechange' event on element 
"script", logic in function createScriptTag() is not correct.
I changed it to 
====================================

        createScriptTag: function (url, success, error) {
            var scriptTag = document.createElement("script");
            scriptTag.setAttribute("type", "text/javascript");
            scriptTag.setAttribute("src", url);

            if (HttpLibrary.browser.msie) {
                 scriptTag.onreadystatechange = function () {
                    if ((!this.readyState ||
                    this.readyState == "loaded" || this.readyState == "complete")) {
                        success();
                    }
                };
            }
            else {
                scriptTag.onload == function () {
                    if ((!this.readyState ||
                    this.readyState == "loaded" || this.readyState == "complete")) {
                        success();
                    }
                };
            }

            scriptTag.onerror = function () {
                error(data.url + " failed to load");
            };
            var head = HttpLibrary.getHead();
            head.appendChild(scriptTag);
        }

====================================

work fine.

Original issue reported on code.google.com by jpg...@gmail.com on 16 Jun 2011 at 9:49

GoogleCodeExporter commented 8 years ago
I am afraid the fix you provided did not work for me. I made the proper fix in 
ensure.js to make this work. Please see version 2.7.6

Original comment by omaralzabir@gmail.com on 19 Jul 2011 at 7:53