Closed
Bug 588642
Opened 16 years ago
Closed 14 years ago
WebConsole contentwindow setter and getter to allow coexistence of console objects
Categories
(DevTools :: Console, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: ddahl, Unassigned)
References
Details
(Whiteboard: [console-3])
I just spoke with jst about trying to intercept an existing console object and preserve it if possible.
If we create a setter and getter on the inner contentWindow called console, it will be triggered before (he thinks) our console is fully inited. Our init function should be able to check if there is console.log already in place. If so, we can return undefined from the init function and preserve the existing console.
Before returning, we can then report an error to an already open WebConsole or open the WebConsole and report that there is a console api already in place.
| Reporter | ||
Updated•16 years ago
|
Assignee: nobody → ddahl
| Reporter | ||
Updated•16 years ago
|
Summary: WebConsole contentwindow setter and getter to allow interception of 3rd party consoles → WebConsole contentwindow setter and getter to allow preservation of 3rd party consoles
Comment 1•16 years ago
|
||
To differentiate between this and bug 583476, I'm setting the subject to note that this bug is about maintaining both our console object and a third party console object that gets defined so that logging could potentially go to both places.
This would be nice to have but is not critical and is potentially fraught with peril.
Summary: WebConsole contentwindow setter and getter to allow preservation of 3rd party consoles → WebConsole contentwindow setter and getter to allow coexistence of console objects
| Reporter | ||
Comment 3•16 years ago
|
||
I have since talked to jst about this and this does depend on further polatform work that has not been initiated yet (pretty sure about that).
| Reporter | ||
Updated•16 years ago
|
Assignee: ddahl → nobody
Comment 4•16 years ago
|
||
I *think* this can be done by defining and freezing the console (if "console" can't be used, perhaps an __underscore__ object name can? I believe underscores are reserved...) object so that it can be overwritten/changed. I'm still not 100% sure why the console object has to be exposed to content, why shouldn't it be privileged (like the error console and its associated methods)?
| Reporter | ||
Comment 5•16 years ago
|
||
(In reply to comment #4)
> I'm still not
> 100% sure why the console object has to be exposed to content, why shouldn't it
> be privileged (like the error console and its associated methods)?
Are you talking about "privileged" as in chrome code? Content devs need to be able to call methods on this object from content JS.
Comment 6•16 years ago
|
||
The console object needs to be exposed to content because console.log and friends are becoming a de facto standard. Safari, Chrome, Firefox+Firebug and even, it seems, IE8+ have console.log and developers are started to expect it to be there.
| Reporter | ||
Updated•15 years ago
|
Whiteboard: [console-3]
Comment 7•14 years ago
|
||
Is this bug still relevant? I think this was filed before we put a solution in place to handle when Firebug's console was active.
Comment 8•14 years ago
|
||
This seems to be already fixed. Please reopen if I am mistaken. Thanks!
Status: NEW → RESOLVED
Closed: 14 years ago
Component: Developer Tools → Developer Tools: Console
QA Contact: developer.tools → developer.tools.console
Resolution: --- → FIXED
Updated•8 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•