code: function(w, h, stage_elem) {
          // If necessary, attach any event handlers registered before Crafty started
          if (!this._preBindDone) {
              for (var i = 0; i < this._bindOnInit.length; i++) {
                  var preBind = this._bindOnInit[i];
                  Crafty.bind(preBind.event, preBind.handler);
              }
          }
  
          // The viewport will init things like the default graphics layers as well
          Crafty.viewport.init(w, h, stage_elem);
  
          //call all arbitrary functions attached to onload
          this.trigger("Load");
          this.timer.init();
  
          return this;
      }
docs: @
  #Crafty.init
  @category Core
  @kind Method
  
  @trigger Load - Just after the viewport is initialised. Before the UpdateFrame loops is started
  @sign public this Crafty.init([Number width, Number height, String stage_elem])
  @sign public this Crafty.init([Number width, Number height, HTMLElement stage_elem])
  @param Number width - Width of the stage
  @param Number height - Height of the stage
  @param String or HTMLElement stage_elem - the element to use for the stage
  
  Sets the element to use as the stage, creating it if necessary.  By default a div with id 'cr-stage' is used, but if the 'stage_elem' argument is provided that will be used instead.  (see `Crafty.viewport.init`)
  
  Starts the `UpdateFrame` interval. This will call the `UpdateFrame` event for every frame.
  
  Can pass width and height values for the stage otherwise will default to window size.
  
  All `Load` events will be executed.
  
  Uses `requestAnimationFrame` to sync the drawing with the browser but will default to `setInterval` if the browser does not support it.
  @see Crafty.stop,  Crafty.viewport