Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /html/syntax/parsing/misnested-form-in-template.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="author" href="mailto:haoran.tang.personal@gmail.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div>
A<template><br>BC<form>D<div>E</form>F</div>G</template>H
</div>
<script>
test(function() {
const wrapper = document.querySelector('div');
const expectedContent = "A<template><br>BC<form>D<div>E</div></form>FG</template>H";
const actualContent = wrapper.innerHTML.trim();
assert_equals(actualContent, expectedContent, "The parsed structure should match the expected result with correctly nested elements.");
}, "Testing parsing of misnested <form> tags inside <template>");
</script>