HTML::O...:IFrame(3)
π HTML::O...:IFrame(3) β like, the whole manual, bestie
okay so this is the page for HTML::Object::DOM::Element::IFrame (the title up top says HTML::O...:IFrame(3), but that's just the man page being lazy with abbreviations π). It's a User Contributed Perl Documentation page, and I'm gonna walk you through every single bit of it. Grab a boba π§, we're going in.
β¨ NAME β¨
HTML::Object::DOM::Element::IFrame β the HTML Object DOM iFrame Class. That's it, that's the name. Short, sweet, iconic. π
π SYNOPSIS π
use HTML::Object::DOM::Element::IFrame;
my $iframe = HTML::Object::DOM::Element::IFrame->new ||
die( HTML::Object::DOM::Element::IFrame->error, "\n" );
like the standard new-or-die combo, you know the drill β if the constructor fails, it screams its error at you and bails. classic. π
π¦ VERSION π¦
v0.2.0
that's the version, no cap. π
πΈ DESCRIPTION πΈ
so the HTML::Object::DOM::Element::IFrame interface gives you special properties and methods β beyond the ones it already inherits from the HTML::Object::Element interface β for manipulating the layout and presentation of inline frame elements. basically it's the glow-up on top of the base element class for when you're dealing with <iframe> vibes. β¨
π INHERITANCE π
the family tree, bestie, look at it, it's giving royal lineage π:
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::IFrame |
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------+
so it inherits down the chain: HTML::Object::Element β HTML::Object::EventTarget β HTML::Object::DOM::Node β HTML::Object::DOM::Element β HTML::Object::DOM::Element::IFrame. main character energy at the end of the line, periodt. π
π«Ά PROPERTIES π«Ά
it inherits properties from its parent HTML::Object::DOM::Element β and here's the full roster, no skips:
π align
you hand it a string and it set-or-gets the attribute that specifies the alignment of the frame with respect to the surrounding context.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/align
π allow
a list of origins the frame is allowed to display content from. this attribute also accepts the values self and src, which represent the origin in the iframe's src attribute. the default value is src.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/allow
π allowfullscreen
a boolean value indicating whether the inline frame is willing to be placed into full screen mode. see Using full-screen mode for the details. this defaults to false.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/allowfullscreen
π contentDocument
this does nothing and returns undef under the perl environment. π
in the JavaScript environment, this returns a Document β the active document in the inline frame's nested browsing context.
maybe, in the future, this could fetch the remote page at the specified url, parse the html and return its HTML::Object::DOM object? (that's the maybe, we're manifesting it β¨)
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentDocument
π contentWindow
normally this returns undef under perl, but you can set an HTML::Object::DOM::WindowProxy object.
in the JavaScript environment, this returns a WindowProxy β the window proxy for the nested browsing context.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/contentWindow
π csp
you give it a value and this sets or gets the attribute that specifies the Content Security Policy that an embedded document must agree to enforce upon itself.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/csp
π featurePolicy
read-only.
this does nothing and returns undef under the perl environment.
in the JavaScript environment, this returns the FeaturePolicy interface, which provides a simple API for introspecting the feature policies applied to a specific document.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/featurePolicy
π frameBorder
you hand it a string ("yes" or "no") or an integer (1 or 0) and it will set or get the HTML attribute indicating whether to create borders between frames.
example, slay:
$iframe->frameBorder = 1;
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/frameBorder
π height
a string that reflects the height HTML attribute, indicating the height of the frame.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/height
π longDesc
a string containing the URI of a long description of the frame.
example:
<img src="some_pic.png" id="myPicture" height="1024" width="512" longdesc="/some/where/longdescription.html" />
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/longDesc
π marginHeight
a string that is the height of the frame margin.
example:
<iframe src="/some/where" frameborder="0" name="resource" title="Resource" marginheight="10">
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/marginHeight
π marginWidth
a string that is the width of the frame margin.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/marginWidth
π name
a string that reflects the name HTML attribute, containing a name by which to refer to the frame.
example:
<iframe src="/some/where" frameborder="0" name="resource" title="Resource" marginheight="10">
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/name
π referrerPolicy
a string that reflects the "referrerpolicy" HTML attribute, indicating which referrer to use when fetching the linked resource.
you can use whatever value you want, but the values supported by web browsers are:
"no-referrer"β this means that the"Referer"HTTP header will not be sent."origin"β this means the referrer will be the origin of the page, that is roughly the scheme, the host and the port."unsafe-url"β this means the referrer will include the origin and the path (but not the fragment, password, or username). this case is unsafe, because it can leak path information that has been concealed to third-party by using TLS.
β οΈ ok bestie listen, "unsafe-url" is literally called unsafe for a reason β that path info can leak. the manual said it, I'm just making sure you heard it. π
example:
my $iframe = $doc->createElement("iframe");
$iframe->src = '/';
$iframe->referrerPolicy = "unsafe-url";
my $body = $doc->getElementsByTagName('body')[0];
$body->appendChild($iframe); # Fetch the image using the complete URL as the referrer
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/referrerPolicy
π sandbox
read-only.
a TokenList object that reflects the sandbox HTML attribute, indicating extra restrictions on the behavior of the nested content.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/sandbox
π scrolling
you hand it a string ("true" or "false") and this sets or gets a string indicating whether the browser should provide scrollbars for the frame.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/scrolling
π src
a string that reflects the src HTML attribute, containing the address of the content to be embedded. note that programmatically removing an <iframe>'s src attribute (e.g. via "emoveAttribute" in HTML::Object::DOM::Element) causes about:blank to be loaded in the frame in Firefox (from version 65), Chromium-based browsers, and Safari/iOS. π«
(and yes, it says "emoveAttribute" in the original β I'm not fixing it, I'm just delivering it to you exactly as written. character for character, that's the rule. π)
example:
my $iframe = $doc->createElement( 'iframe' );
$iframe->src = '/';
my $body = $doc->getElementsByTagName( 'body' )->[0];
$body->appendChild( $iframe ); # Fetch the image using the complete URL as the referrer
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/src
π srcdoc
this does nothing and returns undef under the perl environment.
in the JavaScript environment, this sets a string representing the content to display in the frame.
example:
var iframe = document.createElement("iframe");
iframe.srcdoc = `<!DOCTYPE html><p>Hello World!</p>`;
document.body.appendChild(iframe);
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/srcdoc
π width
a string that reflects the width HTML attribute, indicating the width of the frame.
see also the Mozilla documentation: https://developer.mozilla.org/en-US/docs/Web/API/HTMLiFrameElement/width
β METHODS β
it inherits methods from its parent HTML::Object::DOM::Element. that's the whole section β inherited methods, nothing extra to list. short and efficient, we love to see it. β¨
π AUTHOR π
Jacques Deguest <jack@deguest.jp> β the icon who wrote this. π
π¦ SEE ALSO π¦
- Mozilla documentation:
https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement - Mozilla documentation on the iframe element:
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
π 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.
okay that's the whole page bestie, every single flag, string, example and link accounted for, no skips, no cap π«Ά
signing off with the boring-but-required bits: this beauty is perl v5.42.2, dated 2026-02-15, and yes the footer also says HTML::O...:IFrame(3) again because man pages love a little encore. go build something iconic with your iframes π
β¨πΈ
π¦ 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