C# Class Skybound.Gecko.SimpleObjectForScripting

Afficher le fichier Open project: tophatmonocle/DirtyGecko Class Usage Examples

Méthodes publiques

Méthode Description
AddEventListener ( string Type, EventHandler Handler ) : void

Add a C# listner to the xpcom listner. This is done by wrappinig the xpcom event.

RemoveEventListener ( string Type, EventHandler Handler ) : void

Remove C# listner from the xpcom listner.

RunRawJavaScriptOnClient ( string strSourceJavaScript, bool wrapTryCatch ) : void

This will run arbitraty javascript on the client. It creates a script block in the DOM tree and the javascript gets executed. The script block is not permanent. It will be removed on the next call to this method, and replaced by new arbitarty code.

Private Methods

Méthode Description
ScriptBuilder ( string strSourceJavaScript ) : void

Appends a script block with the id of CLIENT_SIDE_JAVASCRIPT_ID, adds it to the dom tree

SimpleObjectForScripting ( nsIDOMWindow &DomWindow ) : System

Method Details

AddEventListener() public méthode

Add a C# listner to the xpcom listner. This is done by wrappinig the xpcom event.
public AddEventListener ( string Type, EventHandler Handler ) : void
Type string The name of the eventtype, for e.g 'MyCustomEvent'. This must be the same as the EventName in the JavaScript.
Handler EventHandler The handler for this event
Résultat void

RemoveEventListener() public méthode

Remove C# listner from the xpcom listner.
public RemoveEventListener ( string Type, EventHandler Handler ) : void
Type string The name of the eventtype, for e.g 'MyCustomEvent'. This must be the same as the EventName in the JavaScript.
Handler EventHandler The handler for this event
Résultat void

RunRawJavaScriptOnClient() public méthode

This will run arbitraty javascript on the client. It creates a script block in the DOM tree and the javascript gets executed. The script block is not permanent. It will be removed on the next call to this method, and replaced by new arbitarty code.
public RunRawJavaScriptOnClient ( string strSourceJavaScript, bool wrapTryCatch ) : void
strSourceJavaScript string The JavaScript Code
wrapTryCatch bool If true it will att a javascript try/catch block for the incomming code.
Résultat void