View Full Version : Loading ExtJS 4.1-beta-2 after page load fails

14 Feb 2012, 1:47 AM

Loading ExtJS 4.1 beta 2 (and also 4.0.7 with different symptoms) dynamically (after the page's load event has fired and the page is ready) causes errors in parsing\loading Ext.

See below the demo of the bug.

In essence, what I had accomplished to to understand from my investigation is that:
When Ext is loading, midway through it's parsing, it registers handlers to the ready event (that is normally fired on load),
later through it's parsing it understands the page is already loaded and fires the ready event,
but all that happens before some key functions of Ext are parsed and registered. Ext.get for one.
Ext.get is a function used in the code that runs on the ready handler, thus causing an error

<!DOCTYPE html>
<script language="javascript" type="text/javascript">
function doit() {
var scriptTag = document.createElement("script");
scriptTag.setAttribute("type", "text/javascript");
scriptTag.setAttribute("src", 'ext-4.1.0-beta-2/ext-all-debug.js');
var head = document.getElementsByTagName("head")[0];
<body onload="doit()">

I bumped into this when I tried loading Ext in an iframe (locally created, no src param),
so for me this mean that until this bug is solved, Our team have to change the entire architecture of our client...


14 Feb 2012, 9:58 AM
We have been doing some work in this area so hopefully the next release will get us closer to running Ext JS 4 in an iframe.