-
-
Notifications
You must be signed in to change notification settings - Fork 233
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
Closes eligrey/classList.js#50 #51
base: master
Are you sure you want to change the base?
Conversation
tested with IE8, IE9, Safari on iOS 6.1.3 (and all new browsers) |
Don't forget to change https://github.com/eligrey/classList.js/blob/master/classList.js#L3 Also, you're leaking a global ( |
Should be better now :) |
@@ -1,6 +1,6 @@ | |||
/* | |||
* classList.js: Cross-browser full element.classList implementation. | |||
* 1.1.20150312 | |||
* 1.1.20150404 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still living in 2015 I see. Mind updating that to 2016?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry.. fixed it
@@ -12,229 +12,244 @@ | |||
/*! @source http://purl.eligrey.com/github/classList.js/blob/master/classList.js */ | |||
|
|||
if ("document" in self) { | |||
(function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The enclosure should probably enclose everything.
Suggest:
(function(self) {
'use strict';
if(!("document" in self)) {
return;
}
// try/catch
// ....
})(typeof self !== 'undefined' ? self : this);
This would help reduce nesting instead of increase it.
Such an enclosure would also fix: #48
No description provided.