mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-02 15:46:33 +00:00
LibWeb: Implement Element.removeAttributeNode()
This commit is contained in:
parent
f13bda60ba
commit
20bdda7f02
Notes:
sideshowbarker
2024-07-16 22:17:03 +09:00
Author: https://github.com/awesomekling
Commit: 20bdda7f02
Pull-request: https://github.com/SerenityOS/serenity/pull/23964
7 changed files with 43 additions and 1 deletions
16
Tests/LibWeb/Text/input/DOM/Element-removeAttributeNode.html
Normal file
16
Tests/LibWeb/Text/input/DOM/Element-removeAttributeNode.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<script src="../include.js"></script>
|
||||
<script>
|
||||
test(() => {
|
||||
let e = document.createElement("div");
|
||||
e.setAttribute("foo", "bar");
|
||||
let a = e.getAttributeNode("foo");
|
||||
let removed = e.removeAttributeNode(a);
|
||||
println(a === removed);
|
||||
try {
|
||||
e.removeAttributeNode(a);
|
||||
println("FAIL");
|
||||
} catch (e) {
|
||||
println("OK: " + e);
|
||||
}
|
||||
});
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue