You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Mike Stay (JIRA)" <ji...@apache.org> on 2009/10/01 20:58:23 UTC
[jira] Created: (SHINDIG-1185) Wrap console.log instead of directly
exposing console
Wrap console.log instead of directly exposing console
-----------------------------------------------------
Key: SHINDIG-1185
URL: https://issues.apache.org/jira/browse/SHINDIG-1185
Project: Shindig
Issue Type: Bug
Components: Javascript
Reporter: Mike Stay
Priority: Minor
Attachments: console.diff
The console object provided by Firebug derives from a different frame's Object, so it inherits none of the modifications to Object.prototype made by cajita.js. Therefore, accessing a non-whitelisted property like console.debug throws an exception rather than returning undefined. This change exposes a simple record with a method that wraps console.log instead of the console object itself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SHINDIG-1185) Wrap console.log instead of
directly exposing console
Posted by "Paul Lindner (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Lindner resolved SHINDIG-1185.
-----------------------------------
Resolution: Fixed
Fix Version/s: 1.1-BETA4
lgtm
> Wrap console.log instead of directly exposing console
> -----------------------------------------------------
>
> Key: SHINDIG-1185
> URL: https://issues.apache.org/jira/browse/SHINDIG-1185
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Reporter: Mike Stay
> Priority: Minor
> Fix For: 1.1-BETA4
>
> Attachments: console.diff
>
>
> The console object provided by Firebug derives from a different frame's Object, so it inherits none of the modifications to Object.prototype made by cajita.js. Therefore, accessing a non-whitelisted property like console.debug throws an exception rather than returning undefined. This change exposes a simple record with a method that wraps console.log instead of the console object itself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (SHINDIG-1185) Wrap console.log
instead of directly exposing console
Posted by "Mike Stay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1185?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12761302#action_12761302 ]
Mike Stay edited comment on SHINDIG-1185 at 10/1/09 11:59 AM:
--------------------------------------------------------------
The patch:
Index: features/src/main/javascript/features/caja/taming.js
===================================================================
--- features/src/main/javascript/features/caja/taming.js (revision 820746)
+++ features/src/main/javascript/features/caja/taming.js (working copy)
@@ -939,7 +939,9 @@
___.grantFunc(imports.outers, 'alert');
if (console && console.log) {
- imports.outers.console = console;
+ imports.outers.console = {
+ log: function(msg) { return console.log(msg); }
+ };
___.grantRead(imports.outers, 'console');
___.grantFunc(imports.outers.console, 'log');
}
was (Author: mikestay):
The patch
> Wrap console.log instead of directly exposing console
> -----------------------------------------------------
>
> Key: SHINDIG-1185
> URL: https://issues.apache.org/jira/browse/SHINDIG-1185
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Reporter: Mike Stay
> Priority: Minor
> Attachments: console.diff
>
>
> The console object provided by Firebug derives from a different frame's Object, so it inherits none of the modifications to Object.prototype made by cajita.js. Therefore, accessing a non-whitelisted property like console.debug throws an exception rather than returning undefined. This change exposes a simple record with a method that wraps console.log instead of the console object itself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SHINDIG-1185) Wrap console.log instead of directly
exposing console
Posted by "Mike Stay (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SHINDIG-1185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mike Stay updated SHINDIG-1185:
-------------------------------
Attachment: console.diff
The patch
> Wrap console.log instead of directly exposing console
> -----------------------------------------------------
>
> Key: SHINDIG-1185
> URL: https://issues.apache.org/jira/browse/SHINDIG-1185
> Project: Shindig
> Issue Type: Bug
> Components: Javascript
> Reporter: Mike Stay
> Priority: Minor
> Attachments: console.diff
>
>
> The console object provided by Firebug derives from a different frame's Object, so it inherits none of the modifications to Object.prototype made by cajita.js. Therefore, accessing a non-whitelisted property like console.debug throws an exception rather than returning undefined. This change exposes a simple record with a method that wraps console.log instead of the console object itself.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.