Minor test and style tweaks #52

Merged
merged 4 commits into from Jun 12, 2012

Conversation

Projects
None yet
3 participants
Collaborator

banksJeremy commented Jun 12, 2012

(Breaking up recent changes into pull-request-sized chunks for review. I'll be more diligent about using proper topic branches in the future, but this should work okay.)

This addresses some of the issues raised by running jshint with Butter's configuration and tweaked a couple of tests.

@ghost ghost assigned dseif Jun 12, 2012

+ var rspace = /\s+/,
+ rclass = /[\n\t\r]/g,
+ newMethods = {
+ addClass: function (value) {
@dseif

dseif Jun 12, 2012

Owner

For all this we can probably just use classList https://developer.mozilla.org/en/DOM/element.classList. For the browsers that don't support classList yet ( cough ie9 cough ), we can shim it. We use this in Butter if you wanna steal it https://github.com/mozilla/butter/blob/master/src/util/shims.js#L122

@banksJeremy

banksJeremy Jun 12, 2012

Collaborator

It looks like Hixie isn't too hot on having classList added to the SVG DOM. Also, that shim also only adds it to HTMLElement (if it exists), not to Element, so I think it would need a change to work for this.

What do you think?

@dseif

dseif Jun 12, 2012

Owner

Ah didn't realize this was for svg elements as well, thanks. I'll stage this now then.

Owner

dseif commented Jun 12, 2012

Other then my comment about the classList stuff, this is good to go. If you could shim it like we do in Butter then we can stage this.

dseif added a commit that referenced this pull request Jun 12, 2012

@dseif dseif merged commit de80d03 into dseif:master Jun 12, 2012

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