| 57 | |
| 58 | /** |
| 59 | This will work only in Opera and in Firefox with Firebug installed |
| 60 | It outputs any object or message to the error console instead of opening a new window |
| 61 | */ |
| 62 | FCKDebug.OutputInConsole = function( anyObject ) |
| 63 | { |
| 64 | if ( typeof(console) == 'object' && console.debug ) |
| 65 | { |
| 66 | console.debug( anyObject ) ; |
| 67 | return ; |
| 68 | } |
| 69 | if ( typeof(opera) == 'object' && opera.postError ) |
| 70 | { |
| 71 | opera.postError( anyObject ) ; |
| 72 | return ; |
| 73 | } |
| 74 | |
| 75 | if ( location.protocol == 'chrome:' ) |
| 76 | { |
| 77 | var consoleService = Components.classes["@mozilla.org/consoleservice;1"] |
| 78 | .getService(Components.interfaces.nsIConsoleService); |
| 79 | consoleService.logStringMessage("FCKeditor: " + anyObject); |
| 80 | return ; |
| 81 | } |
| 82 | |
| 83 | this.Output(anyObject) ; |
| 84 | } |