-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Fix profiler throwing javascript errors on IE8 & IE9 #13447 #13634
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
Conversation
}, false); | ||
/* check for older browsers */ | ||
if (!window.addEventListener) { | ||
this.attachEvent("readystatechange", 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.
It's onreadystatechange if I'm not wrong?
I'd also deduplicate the closure by putting it in a variable
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.
Thx for feedback, will fix it!
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.
It can be nice to add a comment like that to help people to handerstand this part of code.
// Fix ie8&9, does not have XMLHttpRequest.addEventListener method.
// @see https://developer.mozilla.org/fr/docs/Web/API/Element.addEventListener#Internet_Explorer
| Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR |
}; | ||
|
||
/* check for older browsers */ | ||
if (!window.addEventListener) { |
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.
you should use this.addEventListener
here as this is what you use just after
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.
Thx for feedback, changed it
| Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR |
There is also 2 addEventListener calls in |
Closing in favor of #13636 |
No description provided.