mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +02:00
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.
This commit is contained in:
committed by
Andreas Kling
parent
eebdc7bc88
commit
558fef237c
Notes:
sideshowbarker
2024-07-17 11:33:34 +09:00
Author: https://github.com/tcl3 Commit: https://github.com/SerenityOS/serenity/commit/558fef237c Pull-request: https://github.com/SerenityOS/serenity/pull/23771 Reviewed-by: https://github.com/awesomekling Reviewed-by: https://github.com/kalenikaliaksandr Reviewed-by: https://github.com/shannonbooth
@@ -0,0 +1,11 @@
|
||||
<!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>
|
||||
Reference in New Issue
Block a user