-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Add valueAsInt and valueAsDouble to dart:html #8163
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
Comments
I wonder what the real thing is in browsers. Presumably it's a double. Maybe dart:html could do the conversion. Not sure how they've handled similar issues before, but presumably a lot of DOM numbers have this problem. |
One idea is for Web UI to provide conversion filters. One way or another, I'd love to bind to models that are annotated with int :) |
This comment was originally written by [email protected] I would like this feature as well. Got to this issue from web-ui issue #317. |
@seth, we'll definitely have filters in web_ui. But the int/double distinction seems useful to capture in our DOM-for-Dart, since not everyone will be using web_ui package. |
I worry about adding duplicate members which are backed by the same field, just for the purpose of coercion to the binding destination. I think this is something which should be addressed further down in the binding system. It would be nice if doubles or ints could automatically be coerced by the binding system. |
Added this to the Later milestone. |
Removed Area-HTML label. |
Removed this from the Later milestone. |
Removed Oldschool-Milestone-Later label. |
I don't think Polymer suffers from this problem. It seems like the click counter example does exactly this. Added AssumedStale label. |
See https://github.com/dart-lang/web-ui/issues/317
I'd love to bind HTML fields to Dart model objects that have been annotated with int and double.
Right now we have valueAsNumber which returns a variable annotated with num. Adding valueAsInt and valueAsDouble lets me use Web UI to bind to int's and double's.
Thanks!!
The text was updated successfully, but these errors were encountered: