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 upAllow for removing the `id` attribute in Native.Graphics.Element.updateProps #542
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
evancz
May 11, 2016
Member
Sorry for the slow reply. It has been busy times. All the Graphics.* modules have moved to evancz/elm-graphics so it makes sense to retarget stuff like this.
Is it possible to say this in a clearer way? Problem is not clear to me.
|
Sorry for the slow reply. It has been busy times. All the Is it possible to say this in a clearer way? Problem is not clear to me. |
evancz
closed this
May 11, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
rgrempel commentedMar 30, 2016
There is some code here ...
https://github.com/elm-lang/core/blob/3.0.0/src/Native/Graphics/Element.js#L580-L583
... which updates the
idof a DOM node if thetagof anElementhas changed.Now, if the new
tagis an empty string, this code will set theidof the DOM node to an empty string, which probably isn't ideal -- it would probably be better to callremoveAttributein that case to remove theid.This would correspond better to the
setPropscase here ...https://github.com/elm-lang/core/blob/3.0.0/src/Native/Graphics/Element.js#L94-L97
... since, in the
setPropscase, theidattribute is not created at all if it is equal to an empty string.Now, as far as I know, the existing behaviour does not cause any practical problems. So, I'm not suggesting that it is important to change this -- I just thought I'd mention it in case it was useful at some appropriate moment.