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.

nsIDOMNSEventTarget

IID:37CA0054-C715-42df-83C7-35C69E24A632
Inherits From:nsISupports

The nsIDOMNSEventTarget interface is an extension to the standard nsIDOMEventTarget interface, implemented by all event targets in the Document Object Model.


Properties

PRUint32 scriptTypeID

The default script type (language) for events firing on this target. Must be one of the nsIProgrammingLanguage enums, but must not be nsIProgrammingLanguage::UNKNOWN. Most implementations will provide a default type of nsIProgrammingLanguage::JAVASCRIPT.

All targets must support fetching the script language, but not all script targets must support changing it - ie, some targets may only support event handlers written in their default language.


Methods

void addEventListener ( DOMString type , nsIDOMEventListener listener , PRBool useCapture , PRBool wantsUntrusted )

void addEventListener ( DOMString type , nsIDOMEventListener listener , PRBool useCapture , PRBool wantsUntrusted )

This method is the same as the addEventListener() method defined in nsIDOMEventTarget, but it takes one additional argument which lets callers control whether or not they want to receive untrusted events (synthetic events generated by untrusted code)

Arguments:
type: See the type argument to the same method in nsIDOMEventTarget.
listener: See the listener argument to the same method in nsIDOMEventTarget.
useCapture: See the listener argument to the same method in nsIDOMEventTarget.
wantsUntrusted: If false, the listener will not receive any untrusted events (see above), if true, the listener will receive events whether or not they're trusted

Reference documentation is generated from Mozilla's source.