DotNetBrowser
1.21.5
|
Represents JavaScript execution context. Each frame on the web page has it's own execution context. JavaScript objects created in one context will not be visible and accessible in other contexts. More...
Inherits IDisposable.
Public Member Functions | |
void | Dispose () |
Disposes current context More... | |
override bool | Equals (object obj) |
Determines whether the specified JSContext is equal to the current JSContext. More... | |
override int | GetHashCode () |
Serves as a hash function for a particular type. More... | |
JSObject | CreateObject () |
Create a new empty JavaScript object instance that is available in scope of the current execution context. More... | |
Protected Member Functions | |
void | Dispose (bool disposing) |
Properties | |
long | FrameId [get] |
Returns unique identifier of a frame which is associated this this JavaScript execution context. This method returns valid identifier even when context is disposed and frame with this ID doesn't exist anymore. Use this method only in combination with the IsDisposed property. More... | |
long | WorldId [get] |
Gets JavaScript world identifier associated with the current context. More... | |
bool | IsDisposed [get] |
Indicates whether context is disposed or not. JavaScript context is disposed automatically when its frame is being unloaded. All JavaScript objects associated with this context will be disposed automaticall More... | |
Events | |
EventHandler | DisposeEvent |
An event that indicates that context instance disposed. More... | |
Represents JavaScript execution context. Each frame on the web page has it's own execution context. JavaScript objects created in one context will not be visible and accessible in other contexts.
JavaScript context is initialized and created automatically for each frame on the loaded web page only if this frame has JavaScript code. If frame doesn't have JavaScript code, context will not be created for this frame. To force context creation you can call Browser.ExecuteJavaScriptAndReturnValue(long, String)} method for required frame.
When frame is reloaded or another web page is loaded, all existing contexts will be destroyed and new contexts will be created. To check whether context is destroyed get the IsDisposed property or use DisposedEvent.
JSObject DotNetBrowser.JSContext.CreateObject | ( | ) |
Create a new empty JavaScript object instance that is available in scope of the current execution context.
InvalidOperationException | when context is not valid anymore and disposed. |
void DotNetBrowser.JSContext.Dispose | ( | ) |
Disposes current context
override bool DotNetBrowser.JSContext.Equals | ( | object | obj | ) |
override int DotNetBrowser.JSContext.GetHashCode | ( | ) |
Serves as a hash function for a particular type.
|
get |
Returns unique identifier of a frame which is associated this this JavaScript execution context. This method returns valid identifier even when context is disposed and frame with this ID doesn't exist anymore. Use this method only in combination with the IsDisposed property.
|
get |
Indicates whether context is disposed or not. JavaScript context is disposed automatically when its frame is being unloaded. All JavaScript objects associated with this context will be disposed automaticall
|
get |
Gets JavaScript world identifier associated with the current context.
EventHandler DotNetBrowser.JSContext.DisposeEvent |
An event that indicates that context instance disposed.