code: function error() {
                  reject(new TypeError());
                  doc.removeEventListener(api.events.error, error, false);
              }
docs: When receiving an internal fullscreenerror event, reject the promise