Show / Hide Table of Contents

Class HtmlWindow

Provides the managed representation of the JavaScript window object.

Inheritance
System.Object
ScriptObject
HtmlObject
HtmlWindow
Implements
System.Dynamic.IDynamicMetaObjectProvider
Inherited Members
HtmlObject.AttachEvent(String, EventHandler)
HtmlObject.AttachEvent(String, EventHandler<HtmlEventArgs>)
HtmlObject.DetachEvent(String, EventHandler)
HtmlObject.DetachEvent(String, EventHandler<HtmlEventArgs>)
HtmlObject.ConvertTo(Type, Boolean)
ScriptObject.Dispatcher
ScriptObject.ManagedObject
ScriptObject.ConvertTo<T>()
ScriptObject.GetProperty(Int32)
ScriptObject.GetProperty(String)
ScriptObject.Invoke(String, Object[])
ScriptObject.InvokeSelf(Object[])
ScriptObject.SetProperty(Int32, Object)
ScriptObject.SetProperty(String, Object)
ScriptObject.IDynamicMetaObjectProvider.GetMetaObject(Expression)
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 sealed class HtmlWindow : HtmlObject, IDynamicMetaObjectProvider

Properties

| Improve this Doc View Source

CurrentBookmark

Gets or sets a string that represents the hash value of the current page's URL.

Declaration
[NotImplemented]
public string CurrentBookmark { get; set; }
Property Value
Type Description
System.String

The hash value of the current page's URL. If the URL has no hash value, this property returns an empty string.

Exceptions
Type Condition
System.ArgumentNullException

The return value is null.

Methods

| Improve this Doc View Source

Alert(String)

Displays a dialog box that contains an application-defined message.

Declaration
public void Alert(string alertText)
Parameters
Type Name Description
System.String alertText

The text to display.

| Improve this Doc View Source

Confirm(String)

Displays a confirmation dialog box that contains an optional message as well as OK and Cancel buttons.

Declaration
public bool Confirm(string confirmText)
Parameters
Type Name Description
System.String confirmText

The text to display.

Returns
Type Description
System.Boolean

true if the user clicked the OK button; otherwise, false.

| Improve this Doc View Source

Eval(String)

Evaluates a string that contains arbitrary JavaScript code.

Declaration
public object Eval(string code)
Parameters
Type Name Description
System.String code

Javascript code.

Returns
Type Description
System.Object

The results of the JavaScript engine's evaluation of the string in the code parameter.

| Improve this Doc View Source

Navigate(Uri, String, String)

Opens the specified page in the specified browser instance, with the indicated user interface features.

Declaration
public void Navigate(Uri navigateToUri, string target = "_self", string targetFeatures = "")
Parameters
Type Name Description
System.Uri navigateToUri
System.String target
System.String targetFeatures

Implements

System.Dynamic.IDynamicMetaObjectProvider
  • Improve this Doc
  • View Source