Class HtmlWindow
Provides the managed representation of the JavaScript window object.
Implements
Inherited Members
Namespace: System.Windows.Browser
Assembly: OpenSilver.Browser.dll
Syntax
public sealed class HtmlWindow : HtmlObject, IDynamicMetaObjectProvider
Properties
| Improve this Doc View SourceCurrentBookmark
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 SourceAlert(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. |
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. |
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. |
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 |