Question

I have this code

/**
* @file core.js 
* @brief this file contains the basics of the frame work 
*
* @author David Garcia
*
* @date 11/08/1983
*/
(function(){

    window.onerror = function (sMessage, sUrl, sLine) {
        alert("An error occurred at " + sUrl + "\nLine Number: " + sLine + '\n\n' + sMessage);
        return true;
    };

    /**
     * IE fix
     */
    function ieFix(){
        if(typeof window.XMLHttpRequest === 'undefined' &&
            typeof window.ActiveXObject === 'function') {
            window.XMLHttpRequest = function() {
                try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}
                try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}
                return new ActiveXObject('Microsoft.XMLHTTP');
            };
        }
    }   
})();

And I cant fold (collapse) the comments and functions but if I use this code:

 /**
    * @file core.js 
    * @brief this file contains the basics of the frame work 
    *
    * @author David Garcia
    *
    * @date 11/08/1983
    */

window.onerror = function (sMessage, sUrl, sLine) {
            alert("An error occurred at " + sUrl + "\nLine Number: " + sLine + '\n\n' + sMessage);
            return true;
        };

        /**
         * IE fix
         */
        function ieFix(){
            if(typeof window.XMLHttpRequest === 'undefined' &&
                typeof window.ActiveXObject === 'function') {
                window.XMLHttpRequest = function() {
                    try { return new ActiveXObject('Msxml2.XMLHTTP.6.0'); } catch(e) {}
                    try { return new ActiveXObject('Msxml2.XMLHTTP.3.0'); } catch(e) {}
                    return new ActiveXObject('Microsoft.XMLHTTP');
                };
            }
        }

Is a bug or a bad configuration.

Eclipse Version: Indigo Service Release 1. Build id: 20110916-0149. Plugin: Javascript IDE 1.4.1.20110303-1818

Was it helpful?

Solution

There is other plug in that solve this Spket

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top