https://github.com/web-platform-tests/wpt
Raw File
Tip revision: bf7cc00ba4855d78175d162308b5c59c6bed197d authored by Andy Paicu on 23 May 2018, 13:12:21 UTC
Prevent sandboxed documents from reusing the default window
Tip revision: bf7cc00
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