Table of Contents

Class HTMLObjectElement

Namespace
CSharpToJavaScript.APIs.JS
Assembly
CSharpToJavaScript.dll

The HTMLObjectElement interface provides special properties and methods (beyond those on the HTMLElement interface it also has available to it by inheritance) for manipulating the layout and presentation of {{HTMLElement("object")}} element, representing external resources.

[Value("HTMLObjectElement")]
public class HTMLObjectElement : HTMLElement
Inheritance
HTMLObjectElement
Inherited Members

Remarks

-The HTML element implementing this interface: object

See also on MDN

Constructors

HTMLObjectElement()

public HTMLObjectElement()

Properties

Align

[Value("align")]
public string Align { get; set; }

Property Value

string

Archive

[Value("archive")]
public string Archive { get; set; }

Property Value

string

Border

[Value("border")]
public string Border { get; set; }

Property Value

string

Code

[Value("code")]
public string Code { get; set; }

Property Value

string

CodeBase

[Value("codeBase")]
public string CodeBase { get; set; }

Property Value

string

CodeType

[Value("codeType")]
public string CodeType { get; set; }

Property Value

string

ContentDocument

The contentDocument read-only property of
the HTMLObjectElement interface Returns a Document
representing the active document of the object element's nested browsing context, if
any; otherwise null.

[Value("contentDocument")]
public Document? ContentDocument { get; }

Property Value

Document

A 'Document'.

Remarks

ContentWindow

The contentWindow read-only property of
the HTMLObjectElement interface returns a {{glossary("WindowProxy")}}
representing the window proxy of the object element's nested browsing context, if any;
otherwise null.

[Value("contentWindow")]
public Window? ContentWindow { get; }

Property Value

Window

A 'Window', or null if there are none.

Remarks

Data

The data property of the
HTMLObjectElement interface returns a string that
reflects the data HTML attribute, specifying the address
of a resource's data.

[Value("data")]
public string Data { get; set; }

Property Value

string

A string.

Remarks

Declare

[Value("declare")]
public bool Declare { get; set; }

Property Value

bool

Form

The form read-only property of the HTMLObjectElement interface returns an HTMLFormElement object that owns this {{htmlelement("object")}}, or null if this object element is not owned by any form.

[Value("form")]
public HTMLFormElement? Form { get; }

Property Value

HTMLFormElement

An HTMLFormElement or null.

Remarks

Height

The height property of the
HTMLObjectElement interface Returns a string that
reflects the height HTML attribute, specifying the
displayed height of the resource in CSS pixels.

[Value("height")]
public string Height { get; set; }

Property Value

string

A string.

Remarks

Hspace

[Value("hspace")]
public ulong Hspace { get; set; }

Property Value

ulong

Name

The name property of the
HTMLObjectElement interface returns a string that
reflects the name HTML attribute, specifying the name of
the browsing context.

[Value("name")]
public string Name { get; set; }

Property Value

string

A string.

Remarks

Standby

[Value("standby")]
public string Standby { get; set; }

Property Value

string

Type

The type property of the
HTMLObjectElement interface returns a string that
reflects the type HTML attribute, specifying the MIME type
of the resource.

[Value("type")]
public string Type { get; set; }

Property Value

string

A string.

Remarks

UseMap

IMPORTANT
Deprecated
The useMap property of the
HTMLObjectElement interface returns a string that
reflects the usemap HTML attribute, specifying a
map element to use.
[Value("useMap")]
public string UseMap { get; set; }

Property Value

string

A string.

Remarks

ValidationMessage

The validationMessage read-only property
of the HTMLObjectElement interface returns a string
representing a localized message that describes the validation constraints that the
control does not satisfy (if any). This is the empty string if the control is not a
candidate for constraint validation (willValidate is false), or it satisfies its
constraints.

[Value("validationMessage")]
public string ValidationMessage { get; }

Property Value

string

A string.

Remarks

Validity

The validity read-only property of the HTMLObjectElement interface returns a ValidityState object that represents the validity states this element is in. Although {{HTMLElement("object")}} elements are never candidates for constraint validation, the validity state may still be invalid if a custom validity message has been set.

[Value("validity")]
public ValidityState Validity { get; }

Property Value

ValidityState

A ValidityState object.

Remarks

Vspace

[Value("vspace")]
public ulong Vspace { get; set; }

Property Value

ulong

Width

The width property of the
HTMLObjectElement interface returns a string that
reflects the width HTML attribute, specifying the
displayed width of the resource in CSS pixels.

[Value("width")]
public string Width { get; set; }

Property Value

string

A string.

Remarks

WillValidate

The willValidate read-only property of the HTMLObjectElement interface returns false, because object elements are not candidates for constraint validation.

[Value("willValidate")]
public bool WillValidate { get; }

Property Value

bool

The boolean value false.

Remarks

Methods

CheckValidity()

The checkValidity() method of the HTMLObjectElement interface checks if the element is valid, but always returns true because {{HTMLElement("object")}} elements are never candidates for constraint validation.

[Value("checkValidity")]
public bool CheckValidity()

Returns

bool

A boolean value, true.

Remarks

GetSVGDocument()

The getSVGDocument() method of the HTMLObjectElement interface returns the Document object of the embedded SVG.

[Value("getSVGDocument")]
public Document? GetSVGDocument()

Returns

Document

A Document.

Remarks

ReportValidity()

The reportValidity() method of the HTMLObjectElement interface performs the same validity checking steps as the CheckValidity() method. It always returns true because {{HTMLElement("object")}} elements are never candidates for constraint validation.

[Value("reportValidity")]
public bool ReportValidity()

Returns

bool

A boolean value, true.

Remarks

SetCustomValidity(string)

The setCustomValidity() method of the
HTMLObjectElement interface sets a custom validity message for the
element.

[Value("setCustomValidity")]
public GlobalObject.Undefined SetCustomValidity(string error)

Parameters

error string

Returns

GlobalObject.Undefined

None (GlobalObject.Undefined).

Remarks

-'validityState'
-'validityState.ValueMissing'
-'validityState.TypeMismatch'
-'validityState.PatternMismatch'
-'validityState.TooLong'
-'validityState.TooShort'
-'validityState.RangeUnderflow'
-'validityState.RangeOverflow'
-'validityState.StepMismatch'
-'validityState.Valid'
-'validityState.CustomError'

See also on MDN