mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibWeb: Update Element class list is when class attribute is removed
This commit is contained in:
parent
6e77fff698
commit
21e21abeed
Notes:
github-actions[bot]
2024-07-25 04:44:34 +00:00
Author: https://github.com/tcl3
Commit: 21e21abeed
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/817
3 changed files with 18 additions and 2 deletions
13
Tests/LibWeb/Text/input/DOM/Element-classList.html
Normal file
13
Tests/LibWeb/Text/input/DOM/Element-classList.html
Normal 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>
|
Loading…
Add table
Add a link
Reference in a new issue