LibWeb: Update Element class list is when class attribute is removed

This commit is contained in:
Tim Ledbetter 2024-07-23 13:06:20 +01:00 committed by Andreas Kling
commit 21e21abeed
Notes: github-actions[bot] 2024-07-25 04:44:34 +00:00
3 changed files with 18 additions and 2 deletions

View file

@ -0,0 +1,13 @@
<!DOCTYPE html>
<script src="../include.js"></script>
<script>
test(() => {
const element = document.createElement("div");
println(`element.classList initial value: "${element.classList.toString()}"`);
element.classList = "a";
println(`element.classList after setting classList to "a": "${element.classList.toString()}"`);
element.className = "";
println(`element.classList after setting className to "": "${element.classList.toString()}"`);
});
</script>
</html>