pagelet.js
function Pagelet(bigpipe) {
  if (!(this instanceof Pagelet)) return new Pagelet(bigpipe);

  var self = this;

  //
  // Create one single Fortress instance that orchestrates all iframe based client
  // code. This sandbox variable should never be exposed to the outside world in
  // order to prevent leaking.
  //
  this.sandbox = sandbox = sandbox || new Fortress();
  this.bigpipe = bigpipe;

  //
  // Add an initialized method which is __always__ called when the pagelet is
  // either destroyed directly, errored or loaded.
  //
  this.initialized = one(function initialized() {
    self.broadcast('initialized');
  });
}
function Pagelet(bigpipe) {
  if (!(this instanceof Pagelet)) return new Pagelet(bigpipe);

  var self = this;

  //
  // Create one single Fortress instance that orchestrates all iframe based client
  // code. This sandbox variable should never be exposed to the outside world in
  // order to prevent leaking.
  //
  this.sandbox = sandbox = sandbox || new Fortress();
  this.bigpipe = bigpipe;

  //
  // Add an initialized method which is __always__ called when the pagelet is
  // either destroyed directly, errored or loaded.
  //
  this.initialized = one(function initialized() {
    self.broadcast('initialized');
  });
}
function Pagelet ( bigpipe ) { if ( ! ( this instanceof Pagelet ) ) return new Pagelet ( bigpipe ) ; var self = this ; // // Create one single Fortress instance that orchestrates all iframe based client // code. This sandbox variable should never be exposed to the outside world in // order to prevent leaking. // this . sandbox = sandbox = sandbox || new Fortress ( ) ; this . bigpipe = bigpipe ; // // Add an initialized method which is __always__ called when the pagelet is // either destroyed directly, errored or loaded. // this . initialized = one ( function initialized ( ) { self . broadcast ( 'initialized' ) ; } ) ; }
Representation of a single pagelet.

@constructor
@param {BigPipe} bigpipe The BigPipe instance that was created.
@api public
Representation of a single pagelet .