capture/noworkflow/jupyter/index.js
function register_renderer(notebook, trial, history, utils, d3_selection) {
  /* Get an instance of output_area from a CodeCell instance */
  var _notebook$get_cells$r = notebook.get_cells().reduce(function (result, cell) {
    return cell.output_area ? cell : result;
  }, {}),
      output_area = _notebook$get_cells$r.output_area;

  /* History mime */


  var append_history = function append_history(data, metadata, element) {
    var div = document.createElement('div');
    element.append(div);
    var graph = new history.HistoryGraph('history-' + utils.makeid(), div, {
      width: data.width,
      height: data.height,
      hintMessage: ""
    });
    graph.load(data);
    return div;
  };

  /* Trial mime */
  var append_trial = function append_trial(data, metadata, element) {
    var div = document.createElement('div');
    element.append(div);
    var graph = new trial.TrialGraph('trial-' + utils.makeid(), div, {
      width: data.width,
      height: data.height
    });
    graph.load(data, data.trial1, data.trial2);
    return div;
  };

  /**
   * Register the mime type and append_history function with output_area
   */
  output_area.register_mime_type('application/noworkflow.history+json', append_history, {
    safe: true,
    index: 0
  });

  output_area.register_mime_type('application/noworkflow.trial+json', append_trial, {
    safe: true,
    index: 0
  });
}
function register_renderer(notebook, trial, history, utils, d3_selection) {
  /* Get an instance of output_area from a CodeCell instance */
  var _notebook$get_cells$r = notebook.get_cells().reduce(function (result, cell) {
    return cell.output_area ? cell : result;
  }, {}),
      output_area = _notebook$get_cells$r.output_area;

  /* History mime */


  var append_history = function append_history(data, metadata, element) {
    var div = document.createElement('div');
    element.append(div);
    var graph = new history.HistoryGraph('history-' + utils.makeid(), div, {
      width: data.width,
      height: data.height,
      hintMessage: ""
    });
    graph.load(data);
    return div;
  };

  /* Trial mime */
  var append_trial = function append_trial(data, metadata, element) {
    var div = document.createElement('div');
    element.append(div);
    var graph = new trial.TrialGraph('trial-' + utils.makeid(), div, {
      width: data.width,
      height: data.height
    });
    graph.load(data, data.trial1, data.trial2);
    return div;
  };

  /**
   * Register the mime type and append_history function with output_area
   */
  output_area.register_mime_type('application/noworkflow.history+json', append_history, {
    safe: true,
    index: 0
  });

  output_area.register_mime_type('application/noworkflow.trial+json', append_trial, {
    safe: true,
    index: 0
  });
}
function register_renderer ( notebook , trial , history , utils , d3_selection ) { /* Get an instance of output_area from a CodeCell instance */ var _notebook$get_cells$r = notebook . get_cells ( ) . reduce ( function ( result , cell ) { return cell . output_area ? cell : result ; } , { } ) , output_area = _notebook$get_cells$r . output_area ; /* History mime */ var append_history = function append_history ( data , metadata , element ) { var div = document . createElement ( 'div' ) ; element . append ( div ) ; var graph = new history . HistoryGraph ( 'history-' + utils . makeid ( ) , div , { width : data . width , height : data . height , hintMessage : "" } ) ; graph . load ( data ) ; return div ; } ; /* Trial mime */ var append_trial = function append_trial ( data , metadata , element ) { var div = document . createElement ( 'div' ) ; element . append ( div ) ; var graph = new trial . TrialGraph ( 'trial-' + utils . makeid ( ) , div , { width : data . width , height : data . height } ) ; graph . load ( data , data . trial1 , data . trial2 ) ; return div ; } ; /**
   * Register the mime type and append_history function with output_area
   */ output_area . register_mime_type ( 'application/noworkflow.history+json' , append_history , { safe : true , index : 0 } ) ; output_area . register_mime_type ( 'application/noworkflow.trial+json' , append_trial , { safe : true , index : 0 } ) ; }
Register the mime type and append_mime function with the notebook's
output area
Register the mime type and append_mime function with the notebook s output area