https://github.com/web-platform-tests/wpt
Raw File
Tip revision: a3e01e5be250ecebeeefc5e5faf65a8a47f89e64 authored by James Graham on 13 February 2017, 10:16:48 UTC
Pass --enable-experimental-web-platform-features to Chrome instability checker
Tip revision: a3e01e5
Document-implementation.html
<!DOCTYPE html>
<meta charset=utf-8>
<title>Document.implementation</title>
<link rel=help href="https://dom.spec.whatwg.org/#dom-document-implementation">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
test(function() {
  var implementation = document.implementation;
  assert_true(implementation instanceof DOMImplementation,
              "implementation should implement DOMImplementation");
  assert_equals(document.implementation, implementation);
}, "Getting implementation off the same document");

test(function() {
  var doc = document.implementation.createHTMLDocument();
  assert_not_equals(document.implementation, doc.implementation);
}, "Getting implementation off different documents");
</script>
back to top