This should queue a task or something... promises can't be rejected synchronously here.
Consider, what should happen here:
const video = document.querySelector("video");
await video.requestPictureInPicture();
video.setAttribute("disablePictureInPicture", "");
video.removeAttribute("disablePictureInPicture");
That should probably have no effect. The task at the turn of the event loop should check if the attribute is still present and reject the promise(s) at that point.
Raised by @marcoscaceres in #224, about the Disable Picture-in-Picture steps: