Open nevil2 opened 1 week ago
Please provide a minimum reproducible with access to the code, not a blackbox link to a full website
I have made a repository https://github.com/nevil2/svelte-testing-wc
The web component can be found here: https://github.com/nevil2/svelte-testing-wc/blob/ecb28c205307b503178f94cf63a265dcf94031c2/test-component/src/routes/%2Bpage.svelte#L47
Is this what you need?
Describe the bug
With Svelte 5 pre-release (up to 23rd September), an image as a file could be passed into a web component as follows:
<webcomponent {image} />
With Svelte 5 stable (after installation on 5th November), the web component receives the image as a string
"[object File]"
rather than as a file.Since there were no changes to the web component and the problem occurs on multiple browsers, the issue must relate to a change in Svelte 5. Web component also works with other frameworks such as React.
Reproduction
https://climbers-club.co.uk/climbing/submission?tab=Create%20Topo demonstrates the problem.
Inspect the console to see logging messages.
Drag a photo into the box.
The svelte component receives the image file and passes it to the web component.
The web component receives a string.
Logs
System Info
Severity
blocking all usage of svelte