Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /custom-elements/reactions/customized-builtins/HTMLLabelElement.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Custom Elements: CEReactions on HTMLLabelElement interface</title>
<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>