code: function whenDocumentReady( callback ) {
     return new Promise( ( resolve, reject ) => {
        function ready() {
           try {
              resolve( callback() );
           }
           catch( err ) {
              reject( err );
           }
        }
  
        if( document.readyState === 'complete' || document.readyState === 'interactive' ) {
           ready();
        }
        else {
           document.addEventListener( 'DOMContentLoaded', ready );
        }
     } );
  }
docs: ////////////////////////////////////////////////////////////////////////////////////////////////////////////