You are currently viewing a snapshot of www.mozilla.org taken on April 21, 2008. Most of this content is highly out of date (some pages haven't been updated since the project began in 1998) and exists for historical purposes only. If there are any pages on this archive site that you think should be added back to www.mozilla.org, please file a bug.


TOC PREV NEXT INDEX

Embedding Gecko API


nsIObserver


This interface is implemented by an object that wants to observe an event corresponding to a topic. It is scriptable.

See also: nsIObserverService.

Methods
observe

Called when there is a notification for the topic aTopic. The object implementing this interface must have been registered with an observer service such as the nsIObserverService. If you expect multiple topics/subjects, your implementation is responsible for filtering. You should not modify, add, remove, or enumerate notifications in the implemention of observe.

Syntax:

void nsIObserver::observe(in nsISupports aSubject,
	in string aTopic,in wstring aData)  

Parameters:

aSubject: Notification specific interface pointer.
aTopic: The notification topic or subject.
aData: Notification specific wide string, depending on the subject event.

nsresult:

NS_OK if successful.

Written by:Ellen Evans | Comments, questions, complaints? Bug 143387
TOC PREV NEXT INDEX