src/myams/resources/js/myams-core.js
changeset 39 fed67f169e1c
parent 0 f05d7aea098a
child 42 97e0aed85883
equal deleted inserted replaced
38:ea9f341ed53b 39:fed67f169e1c
   447 				.text('@import "' + ams.getSource(url) + '";');
   447 				.text('@import "' + ams.getSource(url) + '";');
   448 			if (callback) {
   448 			if (callback) {
   449 				var styleInterval = setInterval(function () {
   449 				var styleInterval = setInterval(function () {
   450 					try {
   450 					try {
   451 						var _check = style[0].sheet.cssRules;  // Is only populated when file is loaded
   451 						var _check = style[0].sheet.cssRules;  // Is only populated when file is loaded
       
   452 						clearInterval(styleInterval);
   452 						callback.call(window, true, options);
   453 						callback.call(window, true, options);
   453 						clearInterval(styleInterval);
       
   454 					} catch (e) {
   454 					} catch (e) {
   455 						// CSS is not loaded yet...
   455 						// CSS is not loaded yet...
   456 					}
   456 					}
   457 				}, 10);
   457 				}, 10);
   458 			}
   458 			}