C# Класс Skybound.Gecko.SimpleObjectForScripting

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

AddEventListener() публичный Метод

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
Результат void

RemoveEventListener() публичный Метод

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
Результат void

RunRawJavaScriptOnClient() публичный Метод

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.
Результат void