-
Notifications
You must be signed in to change notification settings - Fork 62
console.log in tests doesn't work on IE8 and lower #164
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
Comments
Probably related to this? browserstack-runner/lib/_patch/browserstack.js Lines 35 to 49 in 51618fc
|
Yup, getting console logs to users console is nice feature, hence raised this issue so we fix it :) |
Krinkle
added a commit
to Krinkle/browserstack-runner
that referenced
this issue
Apr 11, 2021
Follows-up 826d2c7. Before that commit, the reason global "console" was globbered is that the `var console` part of the inner `var console = {}` assignment was hosted by the JavaScript engine. Thus the variable always existed in the local scope as type "undefined", and so the conditional check never saw the real console, and always created a custom one. Thus it always deleted the original console reference, as well as any other it contained. In commit 826d2c7, this was incorrectly fixed by assigning the unchecked expression referring to `console`, thus no longer having a fallback to `{}` in older browsers, because an unchecked reference like that throws an Uncaught ReferenceError. As a result, browserstack-runner was unable to run in IE 9 or older. Fixes browserstack#161. Fixes browserstack#164. Fixes browserstack#212.
Krinkle
added a commit
to qunitjs/browserstack-runner
that referenced
this issue
Apr 11, 2021
Follows-up 826d2c7. Before that commit, the reason global "console" was globbered is that the `var console` part of the inner `var console = {}` assignment was hosted by the JavaScript engine. Thus the variable always existed in the local scope as type "undefined", and so the conditional check never saw the real console, and always created a custom one. Thus it always deleted the original console reference, as well as any other it contained. In commit 826d2c7, this was incorrectly fixed by assigning the unchecked expression referring to `console`, thus no longer having a fallback to `{}` in older browsers, because an unchecked reference like that throws an Uncaught ReferenceError. As a result, browserstack-runner was unable to run in IE 9 or older. Fixes browserstack#161. Fixes browserstack#164. Fixes browserstack#212. Ref browserstack#241.
francisf
pushed a commit
that referenced
this issue
Apr 21, 2021
Follows-up 826d2c7. Before that commit, the reason global "console" was globbered is that the `var console` part of the inner `var console = {}` assignment was hosted by the JavaScript engine. Thus the variable always existed in the local scope as type "undefined", and so the conditional check never saw the real console, and always created a custom one. Thus it always deleted the original console reference, as well as any other it contained. In commit 826d2c7, this was incorrectly fixed by assigning the unchecked expression referring to `console`, thus no longer having a fallback to `{}` in older browsers, because an unchecked reference like that throws an Uncaught ReferenceError. As a result, browserstack-runner was unable to run in IE 9 or older. Fixes #161. Fixes #164. Fixes #212.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
console.log
in tests on IE8 and lower gives the following error -Object doesn't support this property or method
Can reproduce this using
browserstack-runner
version >= 0.4.2The text was updated successfully, but these errors were encountered: