HTML::O...:Object(3)

πŸ“¦ version 0.6.0, in alpine 3.24

πŸŽ€ HTML::O...:Object(3) πŸŽ€

User Contributed Perl Documentation


🌸 NAME 🌸

HTML::Object::DOM::Element::Object β€” HTML Object DOM Object Class. Periodt. πŸ’…

πŸ’– SYNOPSIS πŸ’–

use HTML::Object::DOM::Element::Object;
my $object = HTML::Object::DOM::Element::Object->new ||
    die( HTML::Object::DOM::Element::Object->error, "\n" );

⭐ VERSION ⭐

v0.2.0

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so this interface gives you special properties and methods β€” like, beyond the ones on the HTML::Object::Element interface that it also has available to it by inheritance β€” for manipulating the layout and presentation of the "<object"> element, which represents external resources.

Deprecated alert, bestie: it is now deprecated. And similarly to <video|HTML::Object::DOM::Element::Video> and <audio|HTML::Object::DOM::Element::Audio> tags, the HTML object tag was used to enable embedding multimedia files into the web page, such as audio, video, Flash, PDF, ActiveX, and Java Applets.
<object width="300" height="200" data="https://example.org/some/where/image.png" type="image/png">Image not found.</object>

<object data="document.pdf" width="500" height="350" type="application/pdf"></object>

πŸ‘‘ INHERITANCE πŸ‘‘

+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +------------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Object |
+-----------------------+     +---------------------------+     +-------------------------+     +----------------------------+     +------------------------------------+

πŸ’… PROPERTIES πŸ’…

Inherits properties from its parent HTML::Object::DOM::Element.

🌈 align 🌈

Is a string representing an enumerated property indicating alignment of the element's contents with respect to the surrounding context. The possible values are "left", "right", "justify", and "center".

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/align

πŸŽ€ archive πŸŽ€

Is a string that reflects the archive HTML attribute, containing a list of archives for resources for this object.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/archive

πŸ¦‹ border πŸ¦‹

Is a string that reflects the border HTML attribute, specifying the width of a border around the object.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/border

✨ code ✨

Is a string representing the name of an applet class file, containing either the applet's subclass, or the path to get to the class, including the class file itself.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/code

πŸ’œ codeBase πŸ’œ

Is a string that reflects the codebase HTML attribute, specifying the base path to use to resolve relative URIs.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/codeBase

🧚 codeType 🧚

Is a string that reflects the codetype HTML attribute, specifying the content type of the data.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/codeType

🌸 contentDocument 🌸

Normally this is a read-only property, but under perl, you can set or get a HTML::Object::DOM::Document object.

Under JavaScript, this returns a Document representing the active document of the object element's nested browsing context, if any; otherwise undef.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/contentDocument

🫢 contentWindow 🫢

Normally this returns undef under perl, but you can set it to a HTML::Object::DOM::WindowProxy object.

Under JavaScript, this is a read-only property that returns a "WindowProxy" representing the window proxy of the object element's nested browsing context, if any; otherwise undef.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/contentWindow

πŸ“ data πŸ“

Sets or gets an URI object.

This returns a string, turned into an URI, that reflects the data HTML attribute, specifying the address of a resource's data.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/data

πŸ’€ declare πŸ’€

Is a boolean value that reflects the declare HTML attribute, indicating that this is a declaration, not an instantiation, of the object.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/declare

πŸŽ€ form πŸŽ€

Read-only.

Returns a HTML::Object::DOM::Element::Form representing the object element's form owner, or undef if there is not one.

Example:

<form action="/some/where/script.pl" id="form1">
    Email: <input type="text" name="email" /><br />
    <input type="submit" value="Submit" />
</form>

<object form="form1" width="300" height="200" data="https://example.org/some/where/image.png" type="image/png">Image not found.</object>

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/form

πŸ‘‘ height πŸ‘‘

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

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/height

πŸ’… hspace πŸ’…

Is a long representing the horizontal space in pixels around the control.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/hspace

⭐ name ⭐

Returns a string that reflects the name HTML attribute, specifying the name of the browsing context.

Example:

<object data="document.pdf" width="300" height="200" name="board_resolution">Alternate text.</object>

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/name

🧚 standby 🧚

Is a string that reflects the standby HTML attribute, specifying a message to display while the object loads.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/standby

πŸ”₯ type πŸ”₯

Is a string that reflects the type HTML attribute, specifying the MIME type of the resource.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/type

🌈 typemustmatch 🌈

typemustmatch indicates that the resource should only be embedded if the value of the type attribute matches with the type of the resource provided in the data attribute.

<object data="flashFile.swf" type="image/png" width="550" height="450" typemustmatch></object>

πŸ¦‹ useMap πŸ¦‹

Is a string that reflects the usemap HTML attribute, specifying a <map> element to use.

Example:

<img src="image.png" width="320" height="320" alt="Dinosaurs" usemap="#dinosaursmap" />

<map name="dinosaursmap">
    <area shape="rect" coords="34,44,270,350" alt="Pterodactyl" href="https://example.org/tag/Pterodactyl" />
    <area shape="rect" coords="290,172,333,250" alt="Triceratop" href="https://example.org/tag/Triceratop" />
    <area shape="circle" coords="337,300,44" alt="Tyrannosaurus" href="https://example.org/tag/Tyrannosaurus" />
</map>

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/useMap

πŸŽ€ validationMessage πŸŽ€

Normally this is read-only, but under perl you can set whatever string value you want.

Under JavaScript, this 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.

Example:

my $String = HTMLObjectElement->validationMessage;

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validationMessage

🌸 validity 🌸

Read-only.

Returns a HTML::Object::DOM::ValidityState with the validity states that this element is in.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/validity

πŸ™ˆ vspace πŸ™ˆ

Is a long representing the horizontal space in pixels around the control.

yep, it says horizontal here too β€” we're keeping it exactly as written, bestie. no cap.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/vspace

πŸ’œ width πŸ’œ

Is a string that reflects the width HTML attribute, specifying the displayed width of the resource in CSS pixels.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/width

✨ willValidate ✨

Normally this is read-only, but under perl you can set whatever boolean value you want.

Under JavaScript, this returns a boolean value that indicates whether the element is a candidate for constraint validation. Always false for HTML::Object::DOM::Element::Object objects.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/willValidate

πŸ”₯ METHODS πŸ”₯

Inherits methods from its parent HTML::Object::DOM::Element.

πŸ’… checkValidity πŸ’…

Normally this is read-only, but under perl you can set whatever boolean value you want.

Under JavaScript, this returns a boolean value that always is true, because object objects are never candidates for constraint validation.

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/checkValidity

🫢 setCustomValidity 🫢

Sets a custom validity message for the element. If this message is not the empty string, then the element is suffering from a custom validity error, and does not validate.

Returns a scalar object

Example:

use feature 'signatures';
sub validate( $inputID )
{
    my $input = $doc->getElementById( $inputID );
    my $validityState = $input->validity;

    if( $validityState->valueMissing )
    {
        $input->setCustomValidity( 'You gotta fill this out, yo!' );
    }
    elsif( $validityState->rangeUnderflow )
    {
        $input->setCustomValidity( 'We need a higher number!' );
    }
    elsif( $validityState->rangeOverflow )
    {
        $input->setCustomValidity( 'Thats too high!' );
    }
    else
    {
        $input->setCustomValidity( '' );
    }
    $input->reportValidity();
}

See also Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement/setCustomValidity

🫢 AUTHOR 🫢

Jacques Deguest <jack@deguest.jp>

✨ SEE ALSO ✨

okay so if you wanna go deeper (and bestie, you should), the actual Mozilla docs are right here β€” they're literally the blueprint for everything this module wraps:

go read them, iykyk πŸ’…


Copyright(c) 2021 DEGUEST Pte. Ltd.

All rights reserved

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. ✨ (yes bestie, same terms as Perl β€” the classic, the iconic, the OG license situation 🫢)


ngl, that's the whole page 🌸 go build something cute with it β€” and remember, <object> isn't just a vibe, it's a whole element. periodt. πŸ‘‘

mwah πŸ’– bye bestie!

* this page was living its best life as part of perl v5.42.2, dated 2026-02-15 β€” HTML::O...:Object(3), forever iconic 🌈

πŸ“¦ where this page comes from