Show / Hide Table of Contents

Class HtmlObject

Provides methods for browser elements that are explicitly supplied by the HTML features exposed by Silverlight.

Inheritance
System.Object
ScriptObject
HtmlObject
HtmlDocument
HtmlElement
HtmlWindow
Implements
System.Dynamic.IDynamicMetaObjectProvider
Inherited Members
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 abstract class HtmlObject : ScriptObject, IDynamicMetaObjectProvider

Constructors

| Improve this Doc View Source

HtmlObject()

Initializes a new instance of the HtmlObject class.

Declaration
[NotImplemented]
protected HtmlObject()

Methods

| Improve this Doc View Source

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

| Improve this Doc View Source

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.

| Improve this Doc View Source

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
ScriptObject.ConvertTo(Type, Boolean)
Exceptions
Type Condition
System.ArgumentException

In all cases.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

Implements

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