Show / Hide Table of Contents

Class HtmlPage

Permits access to, and manipulation of, the browser's Document Object Model (DOM).

Inheritance
System.Object
HtmlPage
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Browser
Assembly: OpenSilver.Browser.dll
Syntax
public static class HtmlPage

Properties

| Improve this Doc View Source

BrowserInformation

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.

| Improve this Doc View Source

Document

Gets the browser's document object.

Declaration
public static HtmlDocument Document { get; }
Property Value
Type Description
HtmlDocument
| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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
| Improve this Doc View Source

Window

Gets the browser's window object.

Declaration
public static HtmlWindow Window { get; }
Property Value
Type Description
HtmlWindow

Methods

| Improve this Doc View Source

PopupWindow(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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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

scriptKey or instance is null.

  • Improve this Doc
  • View Source