Files
servo/tests/wpt/web-platform-tests/html/dom/elements/global-attributes/id-name.html

18 lines
595 B
HTML

<!DOCTYPE html>
<title>id and name attributes and getElementById</title>
<link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com">
<link rel="help" href="https://html.spec.whatwg.org/multipage/#the-id-attribute">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<div id="test">
<div name="abcd"></div>
<p name="abcd" id="abcd"></p>
</div>
<script>
test(function() {
assert_equals(document.getElementById("abcd").nodeName, "P");
assert_equals(document.getElementById("abcd").localName, "p");
});
</script>