ChromiumWebBrowserRegisterJsObject Method |
Version 63.0.0
Registers a Javascript object in this specific browser instance.
Namespace: CefSharp.OffScreenAssembly: CefSharp.OffScreen (in CefSharp.OffScreen.dll) Version: 63.0.0.0 (63.0.0.0)
Syntax public void RegisterJsObject(
string name,
Object objectToBind,
BindingOptions options = null
)
public:
virtual void RegisterJsObject(
String^ name,
Object^ objectToBind,
BindingOptions^ options = nullptr
) sealed
Parameters
- name
- Type: SystemString
The name of the object. (e.g. "foo", if you want the object to be accessible as window.foo). - objectToBind
- Type: SystemObject
The object to be made accessible to Javascript. - options (Optional)
- Type: CefSharpBindingOptions
binding options - camelCaseJavascriptNames default to true
Implements
IWebBrowserRegisterJsObject(String, Object, BindingOptions)Exceptions Exception | Condition |
---|
Exception | Browser is already initialized. RegisterJsObject must be +
called before the underlying CEF browser is created. |
See Also