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

fix classes() for svg elements #445

Merged
merged 6 commits into from
Feb 27, 2018
Merged

Conversation

jeffcunat
Copy link
Contributor

Hello I had a problem using classes function on svg elements (same as #362).
This pull request should fix it as className returns a SVGAnimatedString object for svg elements instead of a simple string.
See notes in [(https://developer.mozilla.org/fr/docs/Web/API/Element/className)]

Copy link
Member

@eddyerburgh eddyerburgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR

Can you add a unit test to check this please

@jeffcunat
Copy link
Contributor Author

Hello Edd,
First of all, nice work with vue-test-utils, I use it every day now !
I have modified the unit test for classes to test svg elements. With dev branch it says :
TypeError: this.element.className.split is not a function
With the PR everything's OK

Copy link
Member

@eddyerburgh eddyerburgh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the test 😀

@eddyerburgh eddyerburgh merged commit bcf580e into vuejs:dev Feb 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants