Open
Bug 1260287
Opened 9 years ago
Updated 2 years ago
Display a warning message when console.log (&info, error, etc) are overridden
Categories
(DevTools :: Console, enhancement, P3)
DevTools
Console
Tracking
(firefox48 affected)
NEW
Tracking | Status | |
---|---|---|
firefox48 | --- | affected |
People
(Reporter: jdescottes, Unassigned)
References
Details
> window.console = myCustomConsoleObject;
If a page overrides the console object, the devtools webconsole displays a warning message : "The Web Console logging API (console.log, console.info, console.warn, console.error) has been disabled by a script on this page".
> window.console.log = function() {};
If a page only overrides the log/info/warn/error methods, no message is displayed. A similar message should also be displayed in this case. (real life example of this: twitter.com disables logging by overriding each method of the Console object)
Sidenote: the message is a bit misleading. We don't actually check if the logging has been disabled, but only that it has been modified. Maybe we should log "The Web Console logging API (console.log, console.info, console.warn, console.error) has been modified by a script on this page. It might be disabled or behave unexpectedly."
Reporter | ||
Updated•9 years ago
|
Has Regression Range: --- → irrelevant
Has STR: --- → irrelevant
Comment 1•9 years ago
|
||
Relevant code for the console object overriding detection (hasNativeConsoleAPI): https://dxr.mozilla.org/mozilla-central/source/devtools/server/actors/webconsole.js#321
Updated•9 years ago
|
Priority: -- → P3
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•6 years ago
|
Type: defect → enhancement
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•