Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /fullscreen/api/promises-reject.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Promises#reject</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
promise_test(async (t) => {
const e = document.createElement("span");
await promise_rejects_js(
t,
TypeError,
e.requestFullscreen(),
"Rejects if the element is not connected"
);
await promise_rejects_js(
t,
TypeError,
document.exitFullscreen(),
"Not in fullscreen"
);
}, "Rejects if the element is not connected");
</script>