Help get this topic noticed by sharing it on
Twitter,
Facebook, or email.
Twitter,
Facebook, or email.
-
I figured out what was causing this.
"Firefox: with Firefox as you mentioned there is difference between the 'window' object which is the app sandbox window object and unsafeWindow object which is the actual page 'window' object."
The extension runs from a sandbox, so the console and window objects are NOT the main page's. Firebug may thusly ignore them.
You can use
unsafeWindow.console.log("message")
or
console.log = unsafeWindow.console.log
This should be in the documentation if it isn't. -
-
Good solution Chester.
Here is what I use:
if (typeof(console) != 'object') {
console = {
log: function(m) {
try { unsafeWindow.console.log(m) }
catch(e) { alert(m) } }
}
}
If you add the above code to the top of your app, then if the console object is not defined it will try the unsafeWindow and if that's not working it will fallback to a simple alert.
We will work on adding a native Crossrider cross-browser console.log support to simplify this. -
-
Is this still working?
I'm having trouble with getting my extension to log anything in Firefox (even with the console.log overwrite you suggested). My extension logs fine under Chrome and IE. When I mock all crossrider calls in the code my extension works okay, but when I use crossrider it does not. Without logging or any form of feedback it is practically impossible for me to track down the problem. -
-
Hello Jo:
Please can you provide the following information:
- Which version of FF and which OS?
- What is the extension ID?
- Do you see any error messages in the console?
-
-
Jo,
Please provide us the above information so we can continue with the help you need.
Thanks. -
-
I am having a similar problem and console.log override is not working in FF. Could you please help.
My Extension Id is 62381
Please note - The Extension is working perfectly in Chrome though! -
-
Hello Danish,
I understand that you are having an issue with console.log() on Firefox. Usually, this works without problems and hence in order to assist further I need to take a closer look.
Therefore, please provide as much of the following information as possible and I will investigate:
- The file/line number where the code snippet can be found
- Which browser and operating system you are testing on, including version numbers
- The exact steps for reproducing the problem
- Any additional useful data, such as URLs, screenshots, videos, ...
-
-
Hi Shlomo,
Thanks for your response.
I have resolved the compatibility issue using javascript 'alert' in FF; So console.log will not be required for now.
Thanks anyways. -
Loading Profile...




EMPLOYEE

EMPLOYEE
