[webkit-dev] How to access formatted Java script Console message ?

Gopal Raghavan gop.rag at gmail.com
Thu May 14 08:48:05 PDT 2009


WebKit/WebCore/page/Cosole.cpp provides Console::log(), debug(), error()
etc., to support Firebug console API.
There are two overloaded addMessage(). Console::log messages are processed
through Console::addMessage(MessageLevel level, ScriptCallStack* callStack,
bool acceptNoArguments)


I am trying to access this message through the chromeClient.

Any idea why only the first argument is passed to  client ?


// in Console::addMessage
    if (getFirstArgumentAsString(callStack->state(), lastCaller, message))
        page->chrome()->client()->addMessageToConsole(message,
lastCaller.lineNumber(), lastCaller.sourceURL().prettyURL());


Immediately, as next step the entire message is provided to inspector.

When inspector processes the ConsoleMessage, it uses the formatter in
front-end/console.js to display it on Inspector console.

Is there a way to access this formatted message ?

Thanks,
--
Gopal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20090514/bdb2bf3d/attachment.html>


More information about the webkit-dev mailing list