<!DOCTYPE html>
<title>ViewTransitionTypeSet should not crash when documentElement is null</title>
<link rel="help" href="https://www.w3.org/TR/css-transitions-2/">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_implements(document.startViewTransition);
const { types } = document.startViewTransition();
document.documentElement.remove();
types.add("a");
assert_array_equals([...types], ["a"]);
}, "ViewTransitionTypeSet should not crash when documentElement is null");
</script>
</html>