jeudi 18 septembre 2014

Ext.onReady is undefined when using microloader

Since the bootstrap.js loads JS assets in async mode, the following code will throw "undefined is not a function" exception.

Code:



<!DOCTYPE HTML>
<html manifest="">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="UTF-8">
<!-- The line below must be kept intact for Sencha Cmd to build your application -->
<script id="microloader" type="text/javascript" src="bootstrap.js"></script>

<script>
// onReady is undefined!
Ext.onReady(function() {
console.log('onReady');
});
</script>


</head>
<body></body>
</html>

Is there any way to know Ext JS is loaded completely when using microloader?



Ext.onReady is undefined when using microloader

Aucun commentaire:

Enregistrer un commentaire