function whenDomContentLoaded() {
  return new Promise(function(resolve, reject) {
    document.addEventListener('DOMContentLoaded', resolve);
  });
}
/**
 * @return {!Promise} Fires when DOMContentLoaded event is received.
 */
@return {!Promise} Fires when DOMContentLoaded event is received.
@return { !Promise } Fires when DOMContentLoaded event is received .
function whenDomContentLoaded() {
  return new Promise(function(resolve, reject) {
    document.addEventListener('DOMContentLoaded', resolve);
  });
}
function whenDomContentLoaded ( ) { return new Promise ( function ( resolve , reject ) { document . addEventListener ( 'DOMContentLoaded' , resolve ) ; } ) ; }
@return {!Promise} Fires when DOMContentLoaded event is received.
@return { !Promise } Fires when DOMContentLoaded event is received .