mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-24 18:24:45 -05:00
89ba7246dd
While it's possible to getComputedStyle() on an unconnected element, the resulting object is not supposed to have any values, since we can't resolve style without a document root anyway. This fixes a crash on https://bandcamp.com
11 lines
No EOL
313 B
HTML
11 lines
No EOL
313 B
HTML
<!doctype html><style>
|
|
* { font: 20px SerenitySans; }
|
|
</style><script>
|
|
let fragment = document.createDocumentFragment()
|
|
let a = document.createElement("a")
|
|
fragment.appendChild(a)
|
|
let b = document.createElement("b")
|
|
a.appendChild(b)
|
|
window.getComputedStyle(b).display
|
|
</script>
|
|
This test passes if we don't crash. |