Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upProvide a way to update arbitrary properties #714
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Sep 18, 2016
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Sep 18, 2016
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lukewestby
Sep 18, 2016
Member
Html.Attributes.property will do this if you want
Html.Attributes.property "scrollTop" (Json.Encode.int 300)You would just need to be careful with things like scrollTop on the first render since nothing will be in the DOM and setting scrollTop doesn't have any effect until the element is actually inserted.
|
Html.Attributes.property "scrollTop" (Json.Encode.int 300)You would just need to be careful with things like |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Fresheyeball
commented
Sep 18, 2016
|
Damn, how the heck did I miss that. |
Fresheyeball
closed this
Sep 18, 2016
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
lukewestby
Sep 18, 2016
Member
I forget about it all the time too, it doesn't come up super often since the built-in attribute stuff covers most use cases
|
I forget about it all the time too, it doesn't come up super often since the built-in attribute stuff covers most use cases |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
|
Should be done with this instead though. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Fresheyeball
Sep 19, 2016
Dom querying really?
On Mon, Sep 19, 2016 at 5:52 PM Evan Czaplicki notifications@github.com
wrote:
Should be done with this
http://package.elm-lang.org/packages/elm-lang/dom/1.1.0/Dom-Scroll#toY
instead though.—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/elm-lang/core/issues/714#issuecomment-248162819, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAlL_7cUL4pBMTcI8Sr9oqAg7WqHKvKaks5qryAvgaJpZM4J_xd5
.
Fresheyeball
commented
Sep 19, 2016
|
Dom querying really?
|
Fresheyeball commentedSep 18, 2016
•
edited
Edited 1 time
-
Fresheyeball
edited Sep 18, 2016 (most recent)
Consider a scenario where we wish to update the
scrollTopproperty on a Node. At the moment, I have to do this withports and hack around querying because there is no post render hook. Its not ideal given that the data being sent is simple view logic, and views cannot issuesCmd. As it standsAttributeworks well for properties exposed as attributes in the Html api, but it could as well update any arbitrary property.Proposition for this use-case
Since the raw
attributefunction takes 2 strings, it could be possible to update any arbitrary property via 'stringly typed match'.