Revision dd3f71885bd5039f7ba6f357ac2a43fc510ee23f authored by Mike Pennisi on 23 December 2017, 00:01:51 UTC, committed by jgraham on 23 April 2018, 17:11:42 UTC
1 parent 18ee2b4
outerHTML.tentative.html
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="./support/helper.js"></script>
<body>
<div id="container"></div>
<script>
var container = document.querySelector('#container')
test(t => {
var html = TrustedHTML.escape(STRINGS.unescapedHTML);
var d = document.createElement('div');
document.querySelector('#container').appendChild(d);
d.outerHTML = html;
assert_equals(container.innerText, STRINGS.unescapedHTML);
while (container.firstChild)
container.firstChild.remove();
}, "outerHTML = TrustedHTML.escape().");
test(t => {
var html = TrustedHTML.unsafelyCreate(STRINGS.unescapedHTML);
var d = document.createElement('div');
container.appendChild(d);
d.outerHTML = html;
assert_equals(container.innerText, STRINGS.unescapedText);
while (container.firstChild)
container.firstChild.remove();
}, "outerHTML = TrustedHTML.unsafelyCreate().");
</script>
![swh spinner](/static/img/swh-spinner.gif)
Computing file changes ...