Sha256: 2066c77b58704286c8216707d746400701d55595d846c4baec2512734f9d5df8

Contents?: true

Size: 1.05 KB

Versions: 7

Compression:

Stored size: 1.05 KB

Contents

// ==========================================================================
// Project:   SproutCore - JavaScript Application Framework
// Copyright: ©2006-2009 Sprout Systems, Inc. and contributors.
//            Portions ©2008-2009 Apple Inc. All rights reserved.
// License:   Licensed under MIT license (see license.js)
// ==========================================================================

require("tasks/task");

// default callback
SC.didPreloadBundle = function() {};

/**
  @private
  A task that preloads a bundle, supplying a target and action to be called
  on bundle load completion.
*/
SC.PreloadBundleTask = SC.Task.extend({
  /**
    The identifier of the bundle to load.
  */
  bundle: null,
  
  /**
    The target to supply to SC.loadBundle.
  */
  target: "SC",
  
  /**
    The action to supply to SC.loadBundle.
  */
  action: "preloaded",
  
  run: function(queue) {
    var bundle;
    if (bundle = this.get("bundle")) {
      var st = Date.now();
      SC.loadBundle(this.get("bundle"), this.get("target"), this.get("action"));
    }
  }
});

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sproutcore-1.4.0.rc.5 lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js
sproutcore-1.4.0.rc.4 lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js
sproutcore-1.4.0.rc.3 lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js
sproutcore-1.4.0.rc.2 lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js
sproutcore-1.4.0.rc lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js
sproutcore-1.0.1049.pre.2 lib/frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js
sproutcore-1.0.1049.pre.1 frameworks/sproutcore/frameworks/foundation/tasks/preload_bundle.js