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/HTMLMeterElement.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Custom Elements: CEReactions on HTMLMeterElement interface</title>
<meta name="assert" content="value, min, max, low, high, optimum of
HTMLMeterElement 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>
<body>
<script>
function getParentElement() {
return document.body;
}
function setAttributes(instance) {
instance.setAttribute('value', '0.6');
}
testReflectAttribute(
'value', 'value', '0.3',
'0.4', 'value on HTMLMeterElement', 'meter',
HTMLMeterElement
);
testReflectAttributeWithDependentAttributes(
'min', 'min', '0.1',
'0.2', 'min on HTMLMeterElement', 'meter',
getParentElement, instance => setAttributes(instance), HTMLMeterElement
);
testReflectAttributeWithDependentAttributes(
'max', 'max', '2',
'3', 'max on HTMLMeterElement', 'meter',
getParentElement, instance => setAttributes(instance), HTMLMeterElement
);
testReflectAttributeWithDependentAttributes(
'low', 'low', '0.1',
'0.2', 'low on HTMLMeterElement', 'meter',
getParentElement, instance => setAttributes(instance), HTMLMeterElement
);
testReflectAttributeWithDependentAttributes(
'high', 'high', '2',
'3', 'high on HTMLMeterElement', 'meter',
getParentElement, instance => setAttributes(instance), HTMLMeterElement
);
testReflectAttributeWithDependentAttributes(
'optimum', 'optimum', '0.3',
'0.4', 'optimum on HTMLMeterElement', 'meter',
getParentElement, instance => setAttributes(instance), HTMLMeterElement
);
</script>
</body>