LibWeb: Implement the HTMLLinkElement.sheet attribute

This returns the link element's associated style sheet.
This commit is contained in:
Tim Ledbetter
2025-03-15 15:39:32 +01:00
committed by Alexander Kalenik
parent db597843d6
commit 1821896ecf
Notes: github-actions[bot] 2025-03-17 13:48:19 +00:00
5 changed files with 26 additions and 1 deletions

View File

@@ -0,0 +1,15 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
asyncTest(done => {
const link = document.createElement("link");
link.rel = "stylesheet";
document.head.appendChild(link);
println(`sheet property initial value: ${link.sheet}`);
link.href = "../valid.css";
link.onload = () => {
println(`Sheet property after stylesheet loaded: ${link.sheet}`);
done();
}
});
</script>