mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-13 22:52:52 +00:00
If the anchor and focus nodes are not within the same document, we can't use them for a selection range. Found by Domato.
11 lines
360 B
HTML
11 lines
360 B
HTML
<body>
|
|
<script src="include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
let newDoc = document.implementation.createHTMLDocument("foo");
|
|
let newDocP = newDoc.createElement("p");
|
|
let selection = window.getSelection();
|
|
selection.setBaseAndExtent(document.body, 0, newDocP, 0);
|
|
println("PASS (Didn't crash)");
|
|
});
|
|
</script>
|