docs: function ready() {
      var callback = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;
  
      var promise = new _es6Promise.Promise(function (resolve) {
          if (document.readyState === "complete") {
              return resolve();
          }
  
          document.addEventListener("DOMContentLoaded", function () {
              resolve();
          });
      });
  
      return typeof callback === "function" ? promise.then(callback) : promise;
  }