Skip to content
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

test attribute copying #39

Closed
yoshuawuyts opened this issue Jan 24, 2017 · 4 comments · Fixed by #47
Closed

test attribute copying #39

yoshuawuyts opened this issue Jan 24, 2017 · 4 comments · Fixed by #47

Comments

@yoshuawuyts
Copy link
Member

We're testing SVG namespaces and events, but not regular ol' attributes. I've been running into issues on the server with this, so we should probably test this. Would also help enable #37 as we need to read and write attributes.

Specifically it'd be nice if tests could hit el.setAttribute() and el.getAttribute(). Thanks!

@yoshuawuyts
Copy link
Member Author

Had a <div data-something="foo"> and a <div data-something-else="bar">, merged em and the result had both properties. Obv something is not going alright there :(

@kristoferjoseph
Copy link
Collaborator

kristoferjoseph commented Jan 26, 2017

What is the expected behavior in that example?
Are you thinking the attribute logic should:
see if the attr exists on old but not on new then nuke it
see if the attr exists on new and old, then update to the new value if they are not the same

Is there ever a case where you would want to retain the old attrs?

@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented Jan 26, 2017 via email

@kristoferjoseph
Copy link
Collaborator

That was my inclination as well.

I checked the code and it seems to at least logically follow the cases I described above.

Will add some more tests to try and get to the bottom of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants