summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/dom/elements/global-attributes/id-name.html
blob: 7fdac993b261e2e7f6e7630a80dd2374df2bedda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<!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>