ladybird/Tests/LibWeb/Text/input/WebAnimations/misc/animate-no-window.html
Tim Ledbetter 558fef237c LibWeb: Use the global object to access the performance object
Previously, we were accessing the performance through the current
window object. Thus caused a crash when `animate()` was called on an
element within a document with no associated window object. The global
object is now used to access the performance object in places where
a window object is not guaranteed to exist.
2024-04-02 07:46:16 +02:00

11 lines
415 B
HTML

<!DOCTYPE html>
<script src="../../include.js"></script>
<script>
test(() => {
const divElement = document.createElement("div");
const newDocument = document.implementation.createDocument("http://www.w3.org/1999/xhtml", "html");
newDocument.documentElement.appendChild(divElement)
animation = divElement.animate({}, {});
println("PASS (didn't crash)");
});
</script>