blob: a49d7b550e7d1d4bedc0433ec79b9e9fc50ccf59 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test-pre.js"></script>
<script>
description('Test that cycles are not allowed in template content');
var template = document.createElement('template');
shouldThrow('template.content.appendChild(template)');
var outerDiv = document.createElement('div');
outerDiv.appendChild(template);
shouldThrow('template.content.appendChild(outerDiv)');
var innerDiv = template.content.appendChild(document.createElement('div'));
shouldThrow('innerDiv.appendChild(template)');
shouldThrow('innerDiv.appendChild(outerDiv)');
var innerTemplate = innerDiv.appendChild(document.createElement('template'));
shouldThrow('innerTemplate.appendChild(outerDiv)');
</script>
<script src="../../../resources/js-test-post.js"></script>