-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot bind value of native <progress> element #7680
Comments
afaik <script>
let value = 50
function handle() {
document.querySelector('input').value = 100
}
</script>
<button on:click={handle}>Set to 100</button>
<input bind:value>
{value} (clicking the button would change the value in the field to 100, but not |
Ok it may be a more general question then, and seems related to the way bindings are not synced with attributes as mentionned in #5705 Is it something we would want (synced attributes) ? |
I just want to make sure, this is not what you want / not enough? <script>
let value;
</script>
<progress {value} /> https://svelte.dev/repl/32337cbfeb4f4b97949fdf950612f7c8?version=3.49.0
No? I don't think I understand what you are trying to do. Why would a different component or part of your code change the value of this DOM element and you need to react to that? |
I guess at this point in the discussion the conclusion is that it doesn't make sense to bind the You can set its
These out of sync attributes can be a bit confusing but maybe this is a different, more general issue ? |
Describe the bug
If I try to bind the
value
attribute of aprogress
element I get an errorIt seems legitimate to be able to bind the progress value doesn't it ?
I can work around it but this would be nice.
Reproduction
Logs
No response
System Info
System: OS: macOS 11.6.7 CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Memory: 448.23 MB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 18.5.0 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 8.12.1 - /usr/local/bin/npm Browsers: Brave Browser: 103.1.40.113 Chrome: 103.0.5060.114 Firefox Developer Edition: 103.0 Safari: 15.5 npmPackages: svelte: ^3.49.0 => 3.49.0
Severity
annoyance
The text was updated successfully, but these errors were encountered: