mirror of
https://github.com/RGBCube/serenity
synced 2025-05-15 09:44:58 +00:00
30 lines
962 B
HTML
30 lines
962 B
HTML
<script src="include.js"></script>
|
|
<script>
|
|
test(() => {
|
|
let e = document.createElement("div")
|
|
e.setAttribute("foo", "bar")
|
|
let attr = e.getAttributeNode("foo")
|
|
let clone = attr.cloneNode()
|
|
|
|
function dumpAttr(name, attr) {
|
|
println(name + ": " + attr)
|
|
println(name + ".ownerElement: " + attr.ownerElement)
|
|
println(name + ".namespaceURI: " + attr.namespaceURI)
|
|
println(name + ".localName: " + attr.localName)
|
|
println(name + ".name: " + attr.name)
|
|
println(name + ".value: " + attr.value)
|
|
println(name + ".specified: " + attr.specified)
|
|
println("")
|
|
}
|
|
|
|
dumpAttr("attr", attr)
|
|
dumpAttr("clone", clone)
|
|
|
|
println("attr === clone -> " + (attr === clone))
|
|
println("attr.isEqualNode(clone) -> " + attr.isEqualNode(clone))
|
|
|
|
e.setAttribute("baz", "bux")
|
|
let other = e.getAttributeNode("baz")
|
|
println("attr.isEqualNode(other) -> " + attr.isEqualNode(other))
|
|
});
|
|
</script>
|