function renderTemplate(experimentalFeaturesData) {
  // This is the javascript code that processes the template:
  jstProcess(new JsEvalContext(experimentalFeaturesData), $('flagsTemplate'));

  // Add handlers to dynamically created HTML elements.
  var elements = document.getElementsByClassName('experiment-select');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onchange = function() {
      handleSelectExperimentalFeatureChoice(this, this.selectedIndex);
      return false;
    };
  }

  elements = document.getElementsByClassName('experiment-enable-disable');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onchange = function() {
      handleEnableExperimentalFeature(this,
          this.options[this.selectedIndex].value == 'enabled');
      return false;
    };
  }

  elements = document.getElementsByClassName('experiment-origin-list-value');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onchange = function() {
      handleSetOriginListFlag(this, this.value);
      return false;
    };
  }

  elements = document.getElementsByClassName('experiment-restart-button');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onclick = restartBrowser;
  }

  // Tab panel selection.
  var tabEls = document.getElementsByClassName('tab');
  for (var i = 0; i < tabEls.length; ++i) {
    tabEls[i].addEventListener('click', function(e) {
      e.preventDefault();
      for (var j= 0; j < tabEls.length; ++j) {
        tabEls[j].parentNode.classList.toggle('selected', tabEls[j] == this);
      }
    });
  }

  var smallScreenCheck = window.matchMedia('(max-width: 480px)');
  // Toggling of experiment description overflow content on smaller screens.
  elements = document.querySelectorAll('.experiment .flex:first-child');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onclick = function(e) {
      if (smallScreenCheck.matches) {
        this.classList.toggle('expand');
      }
    };
  }

  $('experiment-reset-all').onclick = resetAllFlags;

  highlightReferencedFlag();
  var search = FlagSearch.getInstance();
  search.init();
}
/**
 * Takes the |experimentalFeaturesData| input argument which represents data
 * about all the current feature entries and populates the html jstemplate with
 * that data. It expects an object structure like the above.
 * @param {Object} experimentalFeaturesData Information about all experiments.
 *     See returnFlagsExperiments() for the structure of this object.
 */
Takes the |experimentalFeaturesData| input argument which represents data
about all the current feature entries and populates the html jstemplate with
that data. It expects an object structure like the above.
@param {Object} experimentalFeaturesData Information about all experiments.
See returnFlagsExperiments() for the structure of this object.
Takes the |experimentalFeaturesData| input argument which represents data about all the current feature entries and populates the html jstemplate with that data . It expects an object structure like the above . @param { Object } experimentalFeaturesData Information about all experiments . See returnFlagsExperiments () for the structure of this object .
function renderTemplate(experimentalFeaturesData) {
  jstProcess(new JsEvalContext(experimentalFeaturesData), $('flagsTemplate'));
  var elements = document.getElementsByClassName('experiment-select');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onchange = function() {
      handleSelectExperimentalFeatureChoice(this, this.selectedIndex);
      return false;
    };
  }
  elements = document.getElementsByClassName('experiment-enable-disable');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onchange = function() {
      handleEnableExperimentalFeature(this,
          this.options[this.selectedIndex].value == 'enabled');
      return false;
    };
  }
  elements = document.getElementsByClassName('experiment-origin-list-value');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onchange = function() {
      handleSetOriginListFlag(this, this.value);
      return false;
    };
  }
  elements = document.getElementsByClassName('experiment-restart-button');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onclick = restartBrowser;
  }
  var tabEls = document.getElementsByClassName('tab');
  for (var i = 0; i < tabEls.length; ++i) {
    tabEls[i].addEventListener('click', function(e) {
      e.preventDefault();
      for (var j= 0; j < tabEls.length; ++j) {
        tabEls[j].parentNode.classList.toggle('selected', tabEls[j] == this);
      }
    });
  }
  var smallScreenCheck = window.matchMedia('(max-width: 480px)');
  elements = document.querySelectorAll('.experiment .flex:first-child');
  for (var i = 0; i < elements.length; ++i) {
    elements[i].onclick = function(e) {
      if (smallScreenCheck.matches) {
        this.classList.toggle('expand');
      }
    };
  }
  $('experiment-reset-all').onclick = resetAllFlags;
  highlightReferencedFlag();
  var search = FlagSearch.getInstance();
  search.init();
}
function renderTemplate ( experimentalFeaturesData ) { jstProcess ( new JsEvalContext ( experimentalFeaturesData ) , $ ( 'flagsTemplate' ) ) ; var elements = document . getElementsByClassName ( 'experiment-select' ) ; for ( var i = 0 ; i < elements . length ; ++ i ) { elements [ i ] . onchange = function ( ) { handleSelectExperimentalFeatureChoice ( this , this . selectedIndex ) ; return false ; } ; } elements = document . getElementsByClassName ( 'experiment-enable-disable' ) ; for ( var i = 0 ; i < elements . length ; ++ i ) { elements [ i ] . onchange = function ( ) { handleEnableExperimentalFeature ( this , this . options [ this . selectedIndex ] . value == 'enabled' ) ; return false ; } ; } elements = document . getElementsByClassName ( 'experiment-origin-list-value' ) ; for ( var i = 0 ; i < elements . length ; ++ i ) { elements [ i ] . onchange = function ( ) { handleSetOriginListFlag ( this , this . value ) ; return false ; } ; } elements = document . getElementsByClassName ( 'experiment-restart-button' ) ; for ( var i = 0 ; i < elements . length ; ++ i ) { elements [ i ] . onclick = restartBrowser ; } var tabEls = document . getElementsByClassName ( 'tab' ) ; for ( var i = 0 ; i < tabEls . length ; ++ i ) { tabEls [ i ] . addEventListener ( 'click' , function ( e ) { e . preventDefault ( ) ; for ( var j = 0 ; j < tabEls . length ; ++ j ) { tabEls [ j ] . parentNode . classList . toggle ( 'selected' , tabEls [ j ] == this ) ; } } ) ; } var smallScreenCheck = window . matchMedia ( '(max-width: 480px)' ) ; elements = document . querySelectorAll ( '.experiment .flex:first-child' ) ; for ( var i = 0 ; i < elements . length ; ++ i ) { elements [ i ] . onclick = function ( e ) { if ( smallScreenCheck . matches ) { this . classList . toggle ( 'expand' ) ; } } ; } $ ( 'experiment-reset-all' ) . onclick = resetAllFlags ; highlightReferencedFlag ( ) ; var search = FlagSearch . getInstance ( ) ; search . init ( ) ; }
Takes the |experimentalFeaturesData| input argument which represents data
 about all the current feature entries and populates the html jstemplate with
 that data.
Takes the |experimentalFeaturesData| input argument which represents data about all the current feature entries and populates the html jstemplate with that data .
// This is the javascript code that processes the template: // Add handlers to dynamically created HTML elements. // Tab panel selection. // Toggling of experiment description overflow content on smaller screens.