HTML::O...:Object(3)
π 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:
- Mozilla documentation β the Web API
HTMLObjectElementpage:https://developer.mozilla.org/en-US/docs/Web/API/HTMLObjectElement - Mozilla documentation on the
<object>element itself:https://developer.mozilla.org/en-US/docs/Web/HTML/Element/object
go read them, iykyk π
π COPYRIGHT & LICENSE π
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
- alpine 3.24: perl-html-object-doc 0.6.0-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms