-
Notifications
You must be signed in to change notification settings - Fork 224
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
Fixing Firefox and IE8 compatibility issues #75
Conversation
`hasOwnProperty('length')` is not supposed to work on an `NodeList` as it's an inherited property.
It was not overridden in Gecko. The code was altered to accept an optional context, possibly not containing the expected property.
[READY] Gecko Compatibility
It is compatible with Mocha, Karma and mostly, IE6! It then requires a very few changes from chai.
[READY] IE8 Compatible Unit Testing
Thus switching from `getElementsByClassName` to `getElementsByTagName` and targeting only divs.
[READY] Internet Explorer 8 Features Compatibility
@oncletom just a couple of quick observations... addEvent = (function(){
if (document.addEventListener){
return function addStandartEventLister(el, eventName, fn){
return el.addEventListener(eventName, fn, false);
};
}
else {
return function addIEEventListener(el, eventName, fn){
return el.attachEvent('on'+eventName, fn);
};
}
})();
Also, later on when you use the addEvent(window, 'resize', function(){
self.checkImagesNeedReplacing(self.divs);
}, false); ...you can see you pass in |
@oncletom otherwise it looks good. |
@Integralist oh well spotted, true. Fixed, thanks :-) |
[READY] Browsers compatibility
We now have a fully covered unit testing for:
This is the result of the following PR:
They have been merged in the
browsers-compatibility
branch first.Secured data are not pushed in PR incoming from forks.
If the Travis badge is failing for this PR, consider this build as a reference: