mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-10 18:19:03 +00:00
LibWeb: Don't crash when determining slot element auto directionality
This commit is contained in:
parent
1b74104c17
commit
0de3145071
Notes:
github-actions[bot]
2024-09-10 19:59:53 +00:00
Author: https://github.com/tcl3
Commit: 0de3145071
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1364
3 changed files with 16 additions and 1 deletions
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<script src="../include.js"></script>
|
||||
<div id="root">
|
||||
<span></span>
|
||||
</div>
|
||||
<script>
|
||||
const root = document.getElementById("root");
|
||||
test(() => {
|
||||
const shadowTree = `<slot dir="auto"></slot>`;
|
||||
const shadow = document.querySelector("#root").attachShadow({mode: "open"});
|
||||
shadow.innerHTML = shadowTree;
|
||||
println(`Slot directionality: ${getComputedStyle(shadow.querySelector("slot")).direction}`);
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue