Inspector should support clear() in the command line for Firebug parity.
<rdar://problem/6070221>
Created attachment 22750 [details] proposed patch I've added console.clear so that I can talk to the Inspector from within the inspected window. Maybe we don't want non-Firebug compliant stuff in "console"?
Comment on attachment 22750 [details] proposed patch I think this patch looks fine, no technical issues. But please spend some time on your ChangeLogs. You are missing the Console.cpp and InspectorController.cpp changes. The prepare-ChangeLog script will do most of the work for you.
Yes, besides the changelogs this patch looks good. I think it's cleaner to call console.clear() than call back into InspectorController(). Also this should fix a bug where closing the inspector cleared all messages.
(In reply to comment #4) > I think it's cleaner to call console.clear() than call back into InspectorController(). But do we really want to allow web pages to clear the Inspector's console? That neither seems like something a web page need to be able to do, nor does it seem good for our users (since a "malicious" web page could clear the console without their permission).
Hmmm it seems that clear will remove error badges from the bottom bar and from the resources panel. I think it would be ok to let pages clear messages if they didn't also clear their errors and warnings about attempts to do cross-site scripting or other malicious attempts. On the other hand I can see how a developer might know about a set of warnings and errors and want to get them out of their site automatically so they don't clutter the dev's work.
What if the console was cleared but the badging wasn't?
Created attachment 22790 [details] better patch I learned about InspectorController.wrapCallback :-)
Comment on attachment 22790 [details] better patch Looks good and it does seem better to not add console.clear now that I think about the issue with it. But I can imagine it being useful.
Landed in r35786.