Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>Custom Elements: CEReactions on HTMLLabelElement interface</title>
<link rel="author" title="Intel" href="http://www.intel.com">
<meta name="assert"
content="htmlFor of HTMLLabelElement interface must have CEReactions">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="../../resources/custom-elements-helpers.js"></script>
<script src="../resources/reactions.js"></script>
<form id="form">
<input type="radio" name="gender" id="male" value="male">
<input type="radio" name="gender" id="female" value="female">
</form>
<script>
function getParentElement() {
let parentElement = document.getElementById("form");
return parentElement;
}
testReflectAttributeWithParentNode(
'htmlFor', 'for', 'male',
'female', 'htmlFor on HTMLLabelElement', 'label',
getParentElement, HTMLLabelElement
);
</script>