HTML-Object
view release on metacpan or search on metacpan
lib/HTML/Object/DOM.pm view on Meta::CPAN
hr => 'HTML::Object::DOM::Element::HR',
html => 'HTML::Object::DOM::Element::HTML',
iframe => 'HTML::Object::DOM::Element::IFrame',
image => 'HTML::Object::DOM::Element::Image',
input => 'HTML::Object::DOM::Element::Input',
# Deprecated
isindex => 'HTML::Object::DOM::Element::Unknown',
# Deprecated
keygen => 'HTML::Object::DOM::Element::Unknown',
label => 'HTML::Object::DOM::Element::Label',
legend => 'HTML::Object::DOM::Element::Legend',
li => 'HTML::Object::DOM::Element::LI',
'link' => 'HTML::Object::DOM::Element::Link',
listing => 'HTML::Object::DOM::Element::Pre',
'map' => 'HTML::Object::DOM::Element::Map',
marquee => 'HTML::Object::DOM::Element::Marquee',
media => 'HTML::Object::DOM::Element::Media',
menu => 'HTML::Object::DOM::Element::Unknown',
meta => 'HTML::Object::DOM::Element::Meta',
meter => 'HTML::Object::DOM::Element::Meter',
mod => 'HTML::Object::DOM::Element::Mod',
lib/HTML/Object/DOM/Element/FieldSet.pm view on Meta::CPAN
# Note: method checkValidity inherited
# Note: property disabled inherited
# Note: property read-only
sub elements
{
my $self = shift( @_ );
my $children = $self->children;
# my $form_elements = $self->new_array( [qw( button datalist fieldset input label legend meter optgroup option output progress select textarea )] );
# <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/elements#value>
my $form_elements = $self->new_array( [qw( button fieldset input object output select textarea )] );
my $list = $form_elements->as_hash;
my $results = $children->grep(sub{ exists( $form_elements->{ $_->tag } ) });
my $col = $self->new_collection_elements;
$col->push( $results->list );
return( $col );
}
# Note: property read-only form inherited
lib/HTML/Object/DOM/Element/Form.pm view on Meta::CPAN
# Note: property autocapitalize inherited
# Note: method checkValidity inherited
# Note: property read-only
# Same as in HTML::Object::DOM::FieldSet
sub elements
{
my $self = shift( @_ );
my $children = $self->children;
# my $form_elements = $self->new_array( [qw( button datalist fieldset input label legend meter optgroup option output progress select textarea )] );
# <https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/elements#value>
my $form_elements = $self->new_array( [qw( button fieldset input object output select textarea )] );
my $list = $form_elements->as_hash;
my $results = $children->grep(sub{ exists( $form_elements->{ $_->tag } ) });
my $col = $self->new_collection_elements;
$col->push( $results->list );
return( $col );
}
# Note: property
lib/HTML/Object/DOM/Element/Legend.pm view on Meta::CPAN
## This program is free software; you can redistribute it and/or modify it
## under the same terms as Perl itself.
##----------------------------------------------------------------------------
package HTML::Object::DOM::Element::Legend;
BEGIN
{
use strict;
use warnings;
use parent qw( HTML::Object::DOM::Element );
use vars qw( $VERSION );
use HTML::Object::DOM::Element::Shared qw( :legend );
our $VERSION = 'v0.2.0';
};
use strict;
use warnings;
sub init
{
my $self = shift( @_ );
$self->{_init_strict_use_sub} = 1;
$self->SUPER::init( @_ ) || return( $self->pass_error );
$self->{tag} = 'legend' if( !CORE::length( "$self->{tag}" ) );
return( $self );
}
# Note: property accessKey inherited
# Note: property align inherited
# Note: property form inherited
1;
lib/HTML/Object/DOM/Element/Legend.pm view on Meta::CPAN
=encoding utf-8
=head1 NAME
HTML::Object::DOM::Element::Legend - HTML Object DOM Legend Class
=head1 SYNOPSIS
use HTML::Object::DOM::Element::Legend;
my $legend = HTML::Object::DOM::Element::Legend->new ||
die( HTML::Object::DOM::Element::Legend->error, "\n" );
=head1 VERSION
v0.2.0
=head1 DESCRIPTION
The L<HTML::Object::DOM::Element::Legend> is an interface allowing to access properties of the C<<legend>> elements. It inherits properties and methods from the L<HTML::Object::Element> interface.
=head1 INHERITANCE
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------+
| HTML::Object::Element | --> | HTML::Object::EventTarget | --> | HTML::Object::DOM::Node | --> | HTML::Object::DOM::Element | --> | HTML::Object::DOM::Element::Legend |
+-----------------------+ +---------------------------+ +-------------------------+ +----------------------------+ +------------------------------------+
=head1 PROPERTIES
Inherits properties from its parent L<HTML::Object::DOM::Element>
lib/HTML/Object/DOM/Element/Legend.pm view on Meta::CPAN
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLLegendElement/accessKey>
=head2 align
Is a string representing the alignment relative to the form set
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLLegendElement/align>
=head2 form
Is a L<HTML::Object::DOM::Element::Form> representing the form that this legend belongs to. If the legend has a L<fieldset element|HTML::Object::DOM::Element::FieldSet> as its parent, then this attribute returns the same value as the form attribute o...
See also L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLLegendElement/form>
=head1 METHODS
Inherits methods from its parent L<HTML::Object::DOM::Element>
=head1 AUTHOR
Jacques Deguest E<lt>F<jack@deguest.jp>E<gt>
=head1 SEE ALSO
L<Mozilla documentation|https://developer.mozilla.org/en-US/docs/Web/API/HTMLLegendElement>, L<Mozilla documentation on legend element|https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend>
=head1 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.
=cut
lib/HTML/Object/DOM/Element/Shared.pm view on Meta::CPAN
input => [qw(
accept accessKey align allowdirs alt autocapitalize autocomplete autofocus checked
defaultChecked defaultValue dirName disabled files form
formAction formEnctype formMethod formNoValidate formTarget height indeterminate
inputmode labels list max maxLength min minLength multiple name pattern placeholder
readOnly required selectionDirection selectionEnd selectionStart size src step
type useMap validationMessage validity value valueAsDate valueAsNumber
webkitEntries webkitdirectory width willValidate
)],
label => [qw( form )],
legend => [qw( accessKey align form )],
li => [qw( type value )],
'link' => [qw( crossOrigin disabled href hreflang referrerPolicy rel relList type )],
'map' => [qw( name )],
marquee => [qw( height width )],
media => [qw( crossOrigin currentSrc src )],
menu => [qw( compact type )],
meter => [qw( labels max min value )],
object => [qw( align checkValidity height name setCustomValidity type useMap validity validationMessage width willValidate )],
ol => [qw( compact type )],
optgroup => [qw( disabled )],
lib/HTML/html_tags_dict.json view on Meta::CPAN
"is_empty" : false,
"is_inline" : true,
"ref" : "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/keygen"
},
"label" : {
"description" : "Defines a label for an <input> element",
"is_empty" : false,
"is_inline" : true,
"ref" : "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/label"
},
"legend" : {
"description" : "Defines a caption for a <fieldset> element",
"is_empty" : false,
"is_inline" : true,
"ref" : "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/legend"
},
"li" : {
"description" : "Defines a list item",
"is_empty" : false,
"is_inline" : false,
"ref" : "https://developer.mozilla.org/en-US/docs/Web/HTML/Element/li"
},
"line" : {
"description" : "The <line> element is an SVG basic shape used to create a line connecting two points.",
"is_empty" : true,
( run in 1.031 second using v1.01-cache-2.11-cpan-49f99fa48dc )