This project is archived and is in readonly mode.

#726 ✓resolved

Log class borking IE7 in many cases & IE8 with Companion.JS 0.5 installed

Reported by schnix | August 7th, 2009 @ 02:02 PM | in 2.0 (closed)

Log.logger = function(){
---> if(window.console && console.log) console.log.apply(console, arguments);

else Log.logged.push(arguments);


the if line seems buggy with typical error message:

"Das Objekt unterstützt diese Eigenschaft oder Methode nicht. (line 122 - mootools-"

-> Object does not support Attribute or Method...

maybe companion extends the window with a not supported console?


Comments and changes to this ticket

  • csuwldcat

    csuwldcat August 10th, 2009 @ 09:27 PM

    • Assigned user set to “Aaron Newton”

    I just had this happen in IE7 today as well, if you take out the .apply() on the console.log that proceeds the if() and pass just the arguments - console.log(arguments) - the error is not thrown and the log appears in the IE console as expected.

    I do not know what the apply is needed for, perhaps the Log class is reliant on a copied console.log version that has additional properties attached to it?

  • jfr

    jfr August 10th, 2009 @ 11:34 PM

    • Assigned user cleared.


    This is right. Under Companion.JS, "console" object is not a pure Javascript object, but it is implemented by a C++ object that is injected into the page.
    So, the syntax "console.log.apply" is not working. I don't know if I can change it to make it work. I'll try to investigate for a future release.

  • csuwldcat

    csuwldcat August 24th, 2009 @ 06:48 AM

    • Tag changed from internet explorer, 1.2.3, ie8, mootools-more to internet explorer, 1.2.3, breaking, error, ie, ie7, ie8, mootools-more

    Ok, this is definitely an issue with all new IE7 project tests I am running, it is surfacing on many many projects. This is what amounts to unreleasable, it literally is a prohibiting factor for any IE7 versions of apps. Is the console.log.apply() really necessary? I know that you are modifying the function, perhaps for the sake of added functionality, but at the cost of alienating 30% of the audience?

    I say you either fix it as a hotfix or drop it for the time being if that is not possible, perhaps in favor of a simple wrapping function such as the one present in a few of Herald's scripts...

  • csuwldcat

    csuwldcat August 24th, 2009 @ 06:49 AM

    • Title changed from “Log class throws error in IE8 with Companion.JS 0.5 installed” to “Log class borking IE7 in many cases & IE8 with Companion.JS 0.5 installed”
  • Scott Kyle

    Scott Kyle August 24th, 2009 @ 09:00 PM

    • State changed from “new” to “resolved”

    @csuwldcat I see that this was resolved in for the next version of -more in this commit. Until it's released you should the dev version of Log so you don't get that error.

  • jfr

    jfr October 5th, 2009 @ 06:57 PM


    Just a quick not to tell you that new Companion.JS v0.5.3 handles now correctly "apply" methods on all "console" functions.

    So, it is now possible to use "console.log.apply(...)" code to use it.

    Feel free to send back any comments/troubles you may have.


Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

Shared Ticket Bins