Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unlocking during event dispatching is undefined #173

Closed
marcoscaceres opened this issue Mar 14, 2019 · 2 comments
Closed

unlocking during event dispatching is undefined #173

marcoscaceres opened this issue Mar 14, 2019 · 2 comments
Labels

Comments

@marcoscaceres
Copy link
Member

marcoscaceres commented Mar 14, 2019

Consider:

  promise_test(async t => {
    await test_driver.bless("request full screen", () => {
      return document.documentElement.requestFullscreen();
    });
    const newOrientation = getOppositeOrientation();
    const pMustReject = screen.orientation.lock(newOrientation);
    const pMustResolve = new Promise(r => {
      screen.orientation.onchange = () => {
        r(screen.orientation.unlock());
      };
    });
    await promise_rejects(t, new TypeError(), pMustReject);
    await pMustResolve;
    return document.exitFullscreen();
  }, "Unlocking screen orientation during change event causes orientationPendingPromise to reject");

Presumedly, calling unlock() during onchange would cause the [[orientationPendingPromise]] to reject.

@marcoscaceres marcoscaceres changed the title unlocking during event propagation is undefined unlocking during event dispatching is undefined Mar 14, 2019
@Johanna-hub
Copy link
Contributor

The test is here web-platform-tests/wpt#15834

@marcoscaceres
Copy link
Member Author

This is now specified: Event fires, promise resolves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants