mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-07 17:41:54 +00:00
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.
11 lines
415 B
HTML
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>
|