Click or drag to resize

IFrame Interface

Represents a frame in the browser. Each web page loaded in the browser has a main(top-level) frame. The frame itself may have child frames. When a web page is unloaded, its frame and all child frames are closed automatically.

Namespace:  DotNetBrowser.Frames
Assembly:  DotNetBrowser (in DotNetBrowser.dll) Version: 2.16.0
Syntax
C#
public interface IFrame : IAutoDisposable

The IFrame type exposes the following members.

Properties
  NameDescription
Public propertyBrowser
The IBrowser instance associated with this frame.
Public propertyChildren
The collection of the child frames.
Public propertyDocument
The IDocument that can be used to work with DOM of the frame. Can be null if the frame doesn't have a document.
Public propertyHtml
The HTML content of the frame. Can be an empty string if the frame doesn't have a content or its content is empty.
Public propertyIsDisposed
Indicates if the object is already disposed.
(Inherited from IAutoDisposable.)
Public propertyIsMain
Indicates whether the frame is a main (top-level) frame in the browser.
Public propertyLocalStorage
The localStorage instance of this frame.
Public propertyName
The name of the frame. Can be an empty string if the frame doesn't have a name.
Public propertyParent
The parent frame.
Public propertySelectedHtml
The HTML representation of the selected content in the frame. Can be an empty string if there's no selection.
Public propertySelectedText
The text representation of the selected content in the frame. Can be an empty string if there's no selection.
Public propertySessionStorage
The sessionStorage instance of this frame.
Public propertyText
Gets the content of the frame and its sub-frames as plain text or an empty string if the frame does not have content or its content is empty.
Top
Methods
  NameDescription
Public methodCreateJsArrayT
Creates a new IJsArray and copies the contents of the IEnumerableT to it.
Public methodCreateJsArrayBuffer
Creates a new IJsArrayBuffer and copies the contents of the byte array to it.
Public methodCreateJsMapTKey, TValue(IDictionaryTKey, TValue)
Creates a new IJsMap and copies the contents of the IDictionaryTKey, TValue to it.
Public methodCreateJsMapTKey, TValue(IReadOnlyDictionaryTKey, TValue)
Creates a new IJsMap and copies the contents of the IReadOnlyDictionaryTKey, TValue to it.
Public methodCreateJsSetT
Creates a new IJsSet and copies the contents of the IEnumerableT to it.
Public methodExecute
Executes the given command in the frame. Before executing the command, it's recommended to check whether it can be executed or not using the IsCommandEnabled(EditorCommand) method.
Public methodExecuteJavaScript(String, Boolean)
Asynchronously executes JavaScript code using the current context.
Public methodExecuteJavaScriptT(String, Boolean)
Asynchronously executes JavaScript code using the current context and converts the execution result to the specified .NET type.
Public methodInspect(Point)
Inspects the given location in the frame and returns the result of inspection.
Public methodInspect(Int32, Int32)
Inspects the given location in the frame and returns the result of inspection.
Public methodIsCommandEnabled
Indicates if the command with the given command can be executed in the frame. Some commands can be executed only under certain conditions. For example, the InsertText(String) command can be executed only if there's a focused text field in the frame.
Public methodLoadUrl(String)
Navigates the frame to a resource identified by the given url.
Public methodLoadUrl(String, TimeSpan)
Navigates the frame to a resource identified by the given url.
Public methodPrint
Requests printing of the currently loaded web page in this frame.
Public methodViewSource
Opens a popup with the frame's source like the browser does when showing page source.
Top
Events
  NameDescription
Public eventDisposed
Occurs when the object has been disposed.
(Inherited from IAutoDisposable.)
Top
Extension Methods
  NameDescription
Public Extension MethodParseJsonString(String)Overloaded.
Creates an object that represents the result of parsing the given string in JSON format.
(Defined by JsonExtensions.)
Public Extension MethodParseJsonStringT(String)Overloaded.
Creates an object that represents the result of parsing the given string in JSON format.
(Defined by JsonExtensions.)
Top
See Also