Class JsMethodManager
The core JS Method Manager.
JS methods allow the user agent to invoke .NET methods
Inherited Members
Namespace: VoltstroStudios.UnityWebBrowser.Core.Js
Assembly: .dll
Syntax
[Serializable]
public sealed class JsMethodManager
Fields
| Edit this page View SourcejsMethodsEnable
Enables/Disables JS Methods
Declaration
public bool jsMethodsEnable
Field Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceRegisterJsMethod(string, MethodInfo, object)
Registers a method to be able to be invoked by JS
Declaration
public void RegisterJsMethod(string name, MethodInfo methodInfo, object target)
Parameters
Type | Name | Description |
---|---|---|
string | name | Name of the method |
MethodInfo | methodInfo | The MethodInfo of the method |
object | target | Target object that the method lives on |
Exceptions
Type | Condition |
---|---|
NotEnabledException | Thrown if jsMethodsEnable is false |
ArgumentNullException | Thrown if name, methodInfo or target are null or empty |
ArgumentException | Thrown if the name has already been used |
UnsupportedTypeException | Thrown if the method returns anything other then void |