Class HtmlPage
Permits access to, and manipulation of, the browser's Document Object Model (DOM).
Inheritance
Inherited Members
Namespace: System.Windows.Browser
Assembly: OpenSilver.Browser.dll
Syntax
public static class HtmlPage
Properties
| Improve this Doc View SourceBrowserInformation
Gets general information about the browser, such as name, version, and operating system.
Declaration
public static BrowserInformation BrowserInformation { get; }
Property Value
Type | Description |
---|---|
BrowserInformation | An object that represents general information about the hosting browser. |
Document
Gets the browser's document object.
Declaration
public static HtmlDocument Document { get; }
Property Value
Type | Description |
---|---|
HtmlDocument |
IsEnabled
Gets a value that indicates whether the rest of the public surface area of the HTML Bridge feature is enabled.
Declaration
public static bool IsEnabled { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the HTML Bridge feature is enabled; otherwise, false. |
IsPopupWindowAllowed
Indicates whether pop-up windows are allowed.
Declaration
[NotImplemented]
public static bool IsPopupWindowAllowed { get; }
Property Value
Type | Description |
---|---|
System.Boolean | true if pop-up windows are allowed; otherwise, false. |
Plugin
Gets a reference to the Silverlight plug-in that is defined within an <object> or <embed> tag on the host HTML page.
Declaration
public static HtmlElement Plugin { get; }
Property Value
Type | Description |
---|---|
HtmlElement |
Window
Gets the browser's window object.
Declaration
public static HtmlWindow Window { get; }
Property Value
Type | Description |
---|---|
HtmlWindow |
Methods
| Improve this Doc View SourcePopupWindow(Uri, String, HtmlPopupWindowOptions)
Opens a pop-up window.
Declaration
[NotImplemented]
public static HtmlWindow PopupWindow(Uri navigateToUri, string target, HtmlPopupWindowOptions options)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | navigateToUri | Specifies the Uniform Resource Identifier (URI) for the pop-up window. |
System.String | target | Specifies the window that will be opened. |
HtmlPopupWindowOptions | options | Specifies an HtmlPopupWindowOptions object that controls the pop-up window. |
Returns
Type | Description |
---|---|
HtmlWindow | A handle to the new window; or null. |
RegisterCreateableType(String, Type)
Registers a managed type as available for creation from JavaScript code, through the Content.services.createObject and Content.services.createManagedObject helper methods.
Declaration
[NotImplemented]
public static void RegisterCreateableType(string scriptAlias, Type type)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptAlias | The name used to register the managed type. |
System.Type | type | A managed type. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException | scriptAlias or type is null. |
System.ArgumentException | type is not public.-or-type does not have a public, parameterless constructor.-or-type is a string, primitive or value type, managed delegate, or empty string.-or-type contains an embedded null character (System.Char.MinValue).-or-An attempt is made to reregister type. |
RegisterScriptableObject(String, Object)
Registers a managed object for scriptable access by JavaScript code.
Declaration
public static void RegisterScriptableObject(string scriptKey, object instance)
Parameters
Type | Name | Description |
---|---|---|
System.String | scriptKey | The name used to register the managed object. |
System.Object | instance | A managed object. |
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
|