fix: Revert itemscope defined as boolean attribute

pull/8414/head
aMediocreDad 4 years ago
parent aa4d0fc264
commit d63bab922e
No known key found for this signature in database
GPG Key ID: 253246939B19E311

@ -364,7 +364,6 @@ const attribute_lookup: { [key in BooleanAttributes]: AttributeMetadata } & { [k
indeterminate: { applies_to: ['input'] }, indeterminate: { applies_to: ['input'] },
inert: {}, inert: {},
ismap: { property_name: 'isMap', applies_to: ['img'] }, ismap: { property_name: 'isMap', applies_to: ['img'] },
itemscope: {},
loop: { applies_to: ['audio', 'bgsound', 'video'] }, loop: { applies_to: ['audio', 'bgsound', 'video'] },
multiple: { applies_to: ['input', 'select'] }, multiple: { applies_to: ['input', 'select'] },
muted: { applies_to: ['audio', 'video'] }, muted: { applies_to: ['audio', 'video'] },

@ -13,7 +13,6 @@ const _boolean_attributes = [
'hidden', 'hidden',
'inert', 'inert',
'ismap', 'ismap',
'itemscope',
'loop', 'loop',
'multiple', 'multiple',
'muted', 'muted',

@ -1,11 +1,4 @@
// There is no relationship between the attribute name and the document node https://developer.mozilla.org/en-US/docs/Web/HTML/Microdata
export default { export default {
props: { html: '<div itemscope />'
itemscope: true
},
test({ assert, target, component }) {
const div = target.querySelector('div');
assert.ok(div.itemscope);
component.itemscope = false;
assert.ok(!div.itemscope);
}
}; };

@ -1,5 +1 @@
<script> <div itemscope />
export let itemscope;
</script>
<div {itemscope} />

Loading…
Cancel
Save