Prerequsites
$(document).ready(function () {
console.log("document .ready");
...
//Generate exams lists
contentGenerator.generateExamsLst(JSON_sap_erp_lst, exLstMainGridSltr, navPnlSubsolListSltr);
});
4。在 main.js 脚本中有window.load块:
$(window).load(function () {
console.log("document .load");
console.log("After .load flag is: " + isPurgedExLstMainGridHTML);
...
});
var contentGenerator = (function () {
var generateExamsLst = function (json_file, mdl_grid_selector, nav_pnl_selector) {
...
console.log("After data gen flag is: " + isPurgedExLstMainGridHTML);
});
};
...
return {
generateExamsLst: generateExamsLst,
...
};
})();
Google Chrome上的行为
document .ready
document .load
After .load flag is: false
After data gen flag is: false
document .ready
After data gen flag is: false
document .load
After .load flag is: false
Mozilla Firefox上的行为
document .ready
document .load
After .load flag is: false
After data gen flag is: false
document .ready
document .load
After .load flag is: false
After data gen flag is: false
问题