title: Websocket message interupts dynamic loading of ExtJS class
body: <p>in my ExtJS 4.1 application I use a websocket connection to remotely insantiate and control ExtJS classes from the server. The client is registered to websocket.onmessage and is waiting for incoming commands.</p>
  
  <p>I defined a simple protocol for that. The server sends a "CREATE classname id". On client side I use Ext.create to instantiate the class. The server then can send commands via the websocket to the object. E.g. "DOSTUFF id". I'm using the dynamic loading mechnism of ExtJS.</p>
  
  <p>In Chrome everything works fine. </p>
  
  <p>The problem with Firefox is, that the second command message (DOSTUFF) is executed BEFORE the object has been created. This leads to an error because the object cannot be found. It seems that the second websocket commandmessage is executed before ExtJS has loaded the file via HTTP-GET.</p>
  
  <p>In my world JavaScript is executed sequentially (I don't use webworkers). I think the call of Ext.create(..) should be executed synchronously with the HTTP-GET in background, shouldn't it?</p>
  
  <p>Here is a "pseudo" trace output of my client application:</p>
  
  <pre><code>ExecuteCommand (Enter): CREATE ("MyClass", "1")
  HTTP-GET "MyClass.js"
  ExecuteCommand (Enter): DOSTUFF ("1")
  ExecuteCommand (Error): DOSTUFF ("1"): Object not found
  ExecuteCommand (Enter): CREATE ("MyClass", "1"): OK! Object created!
  </code></pre>