mirror of https://github.com/sveltejs/svelte
fix: better handling of inert attribute (add tests) (#7944)
* add inert to attribute_lookup * typed for preventing a repeat of the tragedy * add tests * revert unnecessary change * add more test --------- Co-authored-by: fcrozatier <frederic.crozatier@protonmail.com>pull/8331/head
parent
ca531519a8
commit
1f3d2f7646
@ -0,0 +1,11 @@
|
||||
export default {
|
||||
props: {
|
||||
inert: true
|
||||
},
|
||||
test({ assert, target, component }) {
|
||||
const div = target.querySelector('div');
|
||||
assert.ok(div.inert);
|
||||
component.inert = false;
|
||||
assert.ok(!div.inert);
|
||||
}
|
||||
};
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
export let inert;
|
||||
</script>
|
||||
|
||||
<div {inert}>some div <button>click</button></div>
|
@ -0,0 +1,11 @@
|
||||
export default {
|
||||
props: {
|
||||
itemscope: true
|
||||
},
|
||||
test({ assert, target, component }) {
|
||||
const div = target.querySelector('div');
|
||||
assert.ok(div.itemscope);
|
||||
component.itemscope = false;
|
||||
assert.ok(!div.itemscope);
|
||||
}
|
||||
};
|
@ -0,0 +1,5 @@
|
||||
<script>
|
||||
export let itemscope;
|
||||
</script>
|
||||
|
||||
<div {itemscope} />
|
Loading…
Reference in new issue