Class HtmlObject
Provides methods for browser elements that are explicitly supplied by the HTML features exposed by Silverlight.
Implements
Inherited Members
Namespace: System.Windows.Browser
Assembly: OpenSilver.Browser.dll
Syntax
public abstract class HtmlObject : ScriptObject, IDynamicMetaObjectProvider
Constructors
| Improve this Doc View SourceHtmlObject()
Initializes a new instance of the HtmlObject class.
Declaration
[NotImplemented]
protected HtmlObject()
Methods
| Improve this Doc View SourceAttachEvent(String, EventHandler)
Attaches the specified .NET Framework event handler (System.EventHandler) to the specified event on the current Document Object Model (DOM) object.
Declaration
[NotImplemented]
public bool AttachEvent(string eventName, EventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | eventName | A named event on the DOM object. |
System.EventHandler | handler | The method that handles the event. |
Returns
Type | Description |
---|---|
System.Boolean | true if the event was successfully attached; otherwise, false. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | eventName is an empty string. |
System.ArgumentNullException | eventName is null.-or-handler is null. |
AttachEvent(String, EventHandler<HtmlEventArgs>)
Attaches the specified .NET Framework event handler (System.EventHandler<TEventArgs>) to the specified event on the current Document Object Model (DOM) object.
Declaration
[NotImplemented]
public bool AttachEvent(string eventName, EventHandler<HtmlEventArgs> handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | eventName | A named event on the DOM object. |
System.EventHandler<HtmlEventArgs> | handler | The method that handles the event. |
Returns
Type | Description |
---|---|
System.Boolean | true if the event was successfully attached; otherwise, false. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | eventName is an empty string. |
System.ArgumentNullException | eventName is null.-or-handler is null. |
ConvertTo(Type, Boolean)
Converts the current object to a specified type. This method is not supported.
Declaration
[NotImplemented]
protected override object ConvertTo(Type targetType, bool allowSerialization)
Parameters
Type | Name | Description |
---|---|---|
System.Type | targetType | The conversion type. |
System.Boolean | allowSerialization | true to allow JavaScript Object Notation (JSON) serialization; otherwise, false. |
Returns
Type | Description |
---|---|
System.Object | None. |
Overrides
Exceptions
Type | Condition |
---|---|
System.ArgumentException | In all cases. |
DetachEvent(String, EventHandler)
Detaches the specified.NET Framework event handler (System.EventHandler) from the specified event on the current Document Object Model (DOM) object.
Declaration
[NotImplemented]
public void DetachEvent(string eventName, EventHandler handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | eventName | A named event on the DOM object. |
System.EventHandler | handler | The method that handles the event. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | eventName is an empty string. |
System.ArgumentNullException | eventName is null.-or-handler is null. |
DetachEvent(String, EventHandler<HtmlEventArgs>)
Detaches the specified .NET Framework event handler (System.EventHandler<TEventArgs>) from the specified event on the current Document Object Model (DOM) object.
Declaration
[NotImplemented]
public void DetachEvent(string eventName, EventHandler<HtmlEventArgs> handler)
Parameters
Type | Name | Description |
---|---|---|
System.String | eventName | A named event on the DOM object. |
System.EventHandler<HtmlEventArgs> | handler | The method that handles the event. |
Exceptions
Type | Condition |
---|---|
System.ArgumentException | eventName is an empty string. |
System.ArgumentNullException | eventName is null.-or-handler is null. |