index.js
function fragment(content) {
    var active = pagelet.active;

    if (!active) content = '';
    if (mode === 'sync') return fn.call(context, undefined, content);

    data.id = data.id || pagelet.id;                 // Pagelet id.
    data.path = data.path || pagelet.path;           // Reference to the path.
    data.mode = data.mode || pagelet.mode;           // Pagelet render mode.
    data.remove = active ? false : pagelet.remove;   // Remove from DOM.
    data.parent = pagelet._parent;                   // Send parent name along.
    data.append = pagelet._append;                   // Content should be appended.
    data.remaining = pagelet.bootstrap.length;       // Remaining pagelets number.
    data.hash = {                                    // Temper md5's for template ref
      error: temper.fetch(pagelet.error).hash.client,
      client: temper.fetch(pagelet.view).hash.client
    };

    fn.call(context, undefined, framework.get('fragment', {
      template: content.replace(/<!--(.|\s)*?-->/, ''),
      name: pagelet.name,
      id: pagelet.id,
      state: state,
      data: data
    }));

    return pagelet;
  }
function fragment(content) {
    var active = pagelet.active;

    if (!active) content = '';
    if (mode === 'sync') return fn.call(context, undefined, content);

    data.id = data.id || pagelet.id;                 // Pagelet id.
    data.path = data.path || pagelet.path;           // Reference to the path.
    data.mode = data.mode || pagelet.mode;           // Pagelet render mode.
    data.remove = active ? false : pagelet.remove;   // Remove from DOM.
    data.parent = pagelet._parent;                   // Send parent name along.
    data.append = pagelet._append;                   // Content should be appended.
    data.remaining = pagelet.bootstrap.length;       // Remaining pagelets number.
    data.hash = {                                    // Temper md5's for template ref
      error: temper.fetch(pagelet.error).hash.client,
      client: temper.fetch(pagelet.view).hash.client
    };

    fn.call(context, undefined, framework.get('fragment', {
      template: content.replace(/<!--(.|\s)*?-->/, ''),
      name: pagelet.name,
      id: pagelet.id,
      state: state,
      data: data
    }));

    return pagelet;
  }
function fragment ( content ) { var active = pagelet . active ; if ( ! active ) content = '' ; if ( mode === 'sync' ) return fn . call ( context , undefined , content ) ; data . id = data . id || pagelet . id ; // Pagelet id. data . path = data . path || pagelet . path ; // Reference to the path. data . mode = data . mode || pagelet . mode ; // Pagelet render mode. data . remove = active ? false : pagelet . remove ; // Remove from DOM. data . parent = pagelet . _parent ; // Send parent name along. data . append = pagelet . _append ; // Content should be appended. data . remaining = pagelet . bootstrap . length ; // Remaining pagelets number. data . hash = { // Temper md5's for template ref error : temper . fetch ( pagelet . error ) . hash . client , client : temper . fetch ( pagelet . view ) . hash . client } ; fn . call ( context , undefined , framework . get ( 'fragment' , { template : content . replace ( / <!--(.|\s)*?--> / , '' ) , name : pagelet . name , id : pagelet . id , state : state , data : data } ) ) ; return pagelet ; }
Write the fragmented data.

@param {String} content The content to respond with.
@returns {Pagelet}
@api private
Write the fragmented data .