WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIConsoleService

IID:883472a0-ea9b-11da-8ad9-0800200c9a66
Inherits From:nsISupports

This interface is intended to be used as a service.

This interface is implemented by the following components:


Methods

void getMessageArray ( out nsIConsoleMessage messages , out PRUint32 count ) void logMessage ( nsIConsoleMessage message ) void logStringMessage ( PRUnichar* message ) void registerListener ( nsIConsoleListener listener ) void reset ( ) void unregisterListener ( nsIConsoleListener listener )

void getMessageArray ( out nsIConsoleMessage messages , out PRUint32 count )

Get an array of all the messages logged so far. If no messages are logged, this function will return a count of 0, but still will allocate one word for messages, so as to show up as a 0-length array when called from script.

Arguments:
messages
count

void logMessage ( nsIConsoleMessage message )

Arguments:
message

void logStringMessage ( PRUnichar* message )

Convenience method for logging simple messages.

Arguments:
message

void registerListener ( nsIConsoleListener listener )

To guard against stack overflows from listeners that could log messages (it's easy to do this inadvertently from listeners implemented in JavaScript), we don't call any listeners when another error is already being logged.

Arguments:
listener

void reset ( )

Clear the message buffer (e.g. for privacy reasons).


void unregisterListener ( nsIConsoleListener listener )

Each registered listener should also be unregistered.

Arguments:
listener

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com