0
我有這樣的代碼Eclipse中代碼摺疊錯誤?
/**
* @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');
};
}
}
})();
,我不能折(摺疊)的意見和功能,但如果我用這個代碼:
/**
* @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');
};
}
}
是一個bug或錯誤的配置。
Eclipse版本:Indigo Service Release 1. Build ID:20110916-0149。 插件:Javascript IDE 1.4.1.20110303-1818