LibWeb: Added HTMLLinkElement.as Tests

This commit is contained in:
Hexeption 2024-06-08 02:29:25 +01:00 committed by Andreas Kling
parent 2f4668edce
commit 7ac6fd2746
Notes: sideshowbarker 2024-07-16 18:06:41 +09:00
3 changed files with 19 additions and 21 deletions

View File

@ -1,21 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Link AS test</title>
</head>
<body>
<script>
var link = document.createElement('link');
link.rel = 'stylesheet';
link.href = 'https://fonts.googleapis.com/css?family=Roboto:400,700';
link.as = 'style';
console.log("Link.as: " + link.as); // should be 'style'
link.as = 'uwu';
console.log("Link.as: " + link.as); // should be ''
</script>
</body>
</html>

View File

@ -0,0 +1,2 @@
Link.as: style
Link.as: empty

View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<script src="include.js"></script>
<script>
test(() => {
const link = document.createElement("link");
link.as = "style"
println("Link.as: " + link.as)
link.as = "uwu"
if(link.as === "") {
println("Link.as: empty")
}
});
</script>