https://github.com/web-platform-tests/wpt
Raw File
Tip revision: b55e29597d92ab89063673f031151e2bdb4b9479 authored by Joe Downing on 22 March 2018, 07:35:35 UTC
Move KeyboardLock API methods to a 'keyboard' object
Tip revision: b55e295
Element-firstElementChild.html
<!DOCTYPE HTML>
<meta charset=utf-8>
<title>firstElementChild</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<h1>Test of firstElementChild</h1>
<div id="log"></div>
<p id="parentEl">The result of this test is
<span id="first_element_child" style="font-weight:bold;">logged above.</span></p>
<script>
test(function() {
  var parentEl = document.getElementById("parentEl");
  var fec = parentEl.firstElementChild;
  assert_true(!!fec)
  assert_equals(fec.nodeType, 1)
  assert_equals(fec.getAttribute("id"), "first_element_child")
})
</script>
back to top