https://github.com/web-platform-tests/wpt
Raw File
Tip revision: 0cb962b995d06ee5a8e581277aa7906b039563af authored by Anne van Kesteren on 29 March 2018, 12:32:41 UTC
document.open() and the load event
Tip revision: 0cb962b
document-method-changes.html
<!DOCTYPE html>
<html>
<head>
<title>The import attribute</title>
<link rel="help" href="http://w3c.github.io/webcomponents/spec/imports/#interface-import">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>

<link id="importLink" rel="import" href="resources/body-only.html">
<link                 rel="import" href="resources/test-in-import.html">
</head>
<body>
<div id="log"></div>
<script>
test(function() {
   assert_throws('INVALID_STATE_ERR', function() { importLink.import.open(); }, 'document.open()');
   assert_throws('INVALID_STATE_ERR', function() { importLink.import.write('Hello'); }, 'document.write()');
   assert_throws('INVALID_STATE_ERR', function() { importLink.import.open(); }, 'document.close()');
}, 'Throws an InvalidStateError exception if the Document is an import: From the master document');
</script>
</body>
</html>
back to top