mirror of https://github.com/sveltejs/svelte
fix: correctly handle srcObject attribute on video elements (#14369)
* fix: correctly handle srcObject attribute on video elements * remove side-effect * side-effects agin * side-effects agin * better fixpull/14366/head
parent
7bd1cdf427
commit
811c8d32eb
@ -0,0 +1,5 @@
|
||||
---
|
||||
'svelte': patch
|
||||
---
|
||||
|
||||
fix: correctly handle srcObject attribute on video elements
|
@ -0,0 +1,12 @@
|
||||
import { test } from '../../test';
|
||||
|
||||
export default test({
|
||||
html: `<video></video>`,
|
||||
|
||||
test({ assert, target }) {
|
||||
const video = target.querySelector('video');
|
||||
|
||||
// @ts-ignore
|
||||
assert.deepEqual(video?.srcObject, {});
|
||||
}
|
||||
});
|
@ -0,0 +1,10 @@
|
||||
<script>
|
||||
let srcObject = $state();
|
||||
|
||||
$effect(() => {
|
||||
srcObject = {};
|
||||
})
|
||||
</script>
|
||||
|
||||
<video {srcObject}></video>
|
||||
|
Loading…
Reference in new issue