| 1 | ##---------------------------------------------------------------------------- | ||||||||||||
| 2 | ## HTML Object - ~/lib/HTML/Object/DOM/Element/IFrame.pm | ||||||||||||
| 3 | ## Version v0.2.0 | ||||||||||||
| 4 | ## Copyright(c) 2021 DEGUEST Pte. Ltd. | ||||||||||||
| 5 | ## Author: Jacques Deguest <jack@deguest.jp> | ||||||||||||
| 6 | ## Created 2021/12/23 | ||||||||||||
| 7 | ## Modified 2022/09/18 | ||||||||||||
| 8 | ## All rights reserved. | ||||||||||||
| 9 | ## | ||||||||||||
| 10 | ## | ||||||||||||
| 11 | ## This program is free software; you can redistribute it and/or modify it | ||||||||||||
| 12 | ## under the same terms as Perl itself. | ||||||||||||
| 13 | ##---------------------------------------------------------------------------- | ||||||||||||
| 14 | package HTML::Object::DOM::Element::IFrame; | ||||||||||||
| 15 | BEGIN | ||||||||||||
| 16 | 2 | ▶ | { | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 17 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 18 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 19 | 2 | warnings::register_categories( 'HTML::Object' ); | |||||||||||
| 20 | 2 | ▶ | use parent qw( HTML::Object::DOM::Element ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 21 | 2 | ▶ | use vars qw( $VERSION ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 22 | 2 | ▶ | use HTML::Object::DOM::Element::Shared qw( :iframe ); | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 23 | 2 | our $VERSION = 'v0.2.0'; | |||||||||||
| 24 | }; | ||||||||||||
| 25 | |||||||||||||
| 26 | 2 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 27 | 2 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 28 | |||||||||||||
| 29 | sub init | ||||||||||||
| 30 | 1 | ▶ | { | ||||||||||
|
Subroutine
init: called CC=3 SCAR=13.7
Pod
documented
| |||||||||||||
| 31 | 1 | my $self = shift( @_ ); | |||||||||||
| 32 | 1 | $self->{allowfullscreen} = 0; | |||||||||||
| 33 | 1 | $self->{_init_strict_use_sub} = 1; | |||||||||||
| 34 | 1 | ▶ | $self->SUPER::init( @_ ) || return( $self->pass_error ); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 35 | 1 | ▶ | $self->{tag} = 'iframe' if( !CORE::length( "$self->{tag}" ) ); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 36 | $self->_set_get_internal_attribute_callback( sandbox => sub | ||||||||||||
| 37 | 0 | ▶ | { | ||||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||||
| 38 | 0 | my( $this, $val ) = @_; | |||||||||||
| 39 | 0 | my $list; | |||||||||||
| 40 | 0 | ▶ | return if( !( $list = $this->{_sanbox_list} ) ); | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 41 | # $list->debug( $self->debug ); | ||||||||||||
| 42 | 0 | $list->update( $val ); | |||||||||||
| 43 | 1 | }); | |||||||||||
| 44 | 1 | return( $self ); | |||||||||||
| 45 | } | ||||||||||||
| 46 | |||||||||||||
| 47 | # Note: property attribute align inherited | ||||||||||||
| 48 | |||||||||||||
| 49 | # Note: property attribute | ||||||||||||
| 50 | 0 | ▶ | sub allow : lvalue { return( shift->_set_get_property( 'allow', @_ ) ); } | ||||||||||
|
Subroutine
allow: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 51 | |||||||||||||
| 52 | # Note: property | ||||||||||||
| 53 | 0 | ▶ | sub allowfullscreen : lvalue { return( shift->_set_get_boolean( 'allowfullscreen', @_ ) ); } | ||||||||||
|
Subroutine
allowfullscreen: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 54 | |||||||||||||
| 55 | # TODO: property; fetch remote content and return a HTML::Object::DOM::Document object | ||||||||||||
| 56 | 0 | ▶ | sub contentDocument { return; } | ||||||||||
|
Subroutine
contentDocument: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 57 | |||||||||||||
| 58 | # Note: property does nothing | ||||||||||||
| 59 | 0 | ▶ | sub contentWindow : lvalue { return( shift->_set_get_object_lvalue( 'contentwindow', 'HTML::Object::DOM::WindowProxy', @_ ) ); } | ||||||||||
|
Subroutine
contentWindow: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 60 | |||||||||||||
| 61 | # Note: property | ||||||||||||
| 62 | 0 | ▶ | sub csp : lvalue { return( shift->_set_get_property( 'csp', @_ ) ); } | ||||||||||
|
Subroutine
csp: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 63 | |||||||||||||
| 64 | # Note: property | ||||||||||||
| 65 | 0 | ▶ | sub featurePolicy { return; } | ||||||||||
|
Subroutine
featurePolicy: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 66 | |||||||||||||
| 67 | # Note: property | ||||||||||||
| 68 | 0 | ▶ | sub frameBorder : lvalue { return( shift->_set_get_property( 'frameborder', @_ ) ); } | ||||||||||
|
Subroutine
frameBorder: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 69 | |||||||||||||
| 70 | # Note: property height inherited | ||||||||||||
| 71 | |||||||||||||
| 72 | # Note: property | ||||||||||||
| 73 | 0 | ▶ | sub longDesc : lvalue { return( shift->_set_get_property( 'longdesc', @_ ) ); } | ||||||||||
|
Subroutine
longDesc: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 74 | |||||||||||||
| 75 | # Note: property | ||||||||||||
| 76 | 0 | ▶ | sub marginHeight : lvalue { return( shift->_set_get_property( 'marginheight', @_ ) ); } | ||||||||||
|
Subroutine
marginHeight: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 77 | |||||||||||||
| 78 | # Note: property | ||||||||||||
| 79 | 0 | ▶ | sub marginWidth : lvalue { return( shift->_set_get_property( 'marginwidth', @_ ) ); } | ||||||||||
|
Subroutine
marginWidth: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 80 | |||||||||||||
| 81 | # Note: property name inherited | ||||||||||||
| 82 | |||||||||||||
| 83 | # Note: property referrerPolicy inherited | ||||||||||||
| 84 | |||||||||||||
| 85 | # Note: property read-only | ||||||||||||
| 86 | sub sandbox | ||||||||||||
| 87 | 0 | ▶ | { | ||||||||||
|
Subroutine
sandbox: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||
| 88 | 0 | my $self = shift( @_ ); | |||||||||||
| 89 | 0 | ▶ | unless( $self->{_sanbox_list} ) | ||||||||||
|
Branch: 1 branch
| |||||||||||||
| 90 | { | ||||||||||||
| 91 | 0 | my $sandbox = $self->attr( 'sandbox' ); | |||||||||||
| 92 | 0 | require HTML::Object::TokenList; | |||||||||||
| 93 | 0 | ▶ | $self->{_sanbox_list} = HTML::Object::TokenList->new( $sandbox, element => $self, attribute => 'sandbox', debug => $self->debug ) || | ||||||||||
|
Condition0%0/2
'HTML::Object::TokenList'->new($sandbox, 'element', $self, 'attribute', 'sandbox', 'debug', $self->debug) || (return $self->pass_error('HTML::Object::TokenList'->error))
MC/DC0%0/1
'HTML::Object::TokenList'->new($sandbox, 'element', $self, 'attribute', 'sandbox', 'debug', $self->debug) || (return $self->pass_error('HTML::Object::TokenList'->error))
'HTML::Object::TokenList'->new($sandbox, 'element', $self, 'attribute', 'sandbox', 'debug', $self->debug)
Truth table0%0/2
A
A= 'HTML::Object::TokenList'->new($sandbox, 'element', $self, 'attribute', 'sandbox', 'debug', $self->debug)
| |||||||||||||
| 94 | return( $self->pass_error( HTML::Object::TokenList->error ) ); | ||||||||||||
| 95 | } | ||||||||||||
| 96 | 0 | return( $self->{_sanbox_list} ); | |||||||||||
| 97 | } | ||||||||||||
| 98 | |||||||||||||
| 99 | # Note: property | ||||||||||||
| 100 | 0 | ▶ | sub scrolling : lvalue { return( shift->_set_get_property( 'scrolling', @_ ) ); } | ||||||||||
|
Subroutine
scrolling: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 101 | |||||||||||||
| 102 | # Note: property src inherited | ||||||||||||
| 103 | |||||||||||||
| 104 | # Note: property | ||||||||||||
| 105 | 0 | ▶ | sub srcdoc : lvalue { return( shift->_set_get_property( 'srcdoc', @_ ) ); } | ||||||||||
|
Subroutine
srcdoc: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 106 | |||||||||||||
| 107 | # Note: property width inherited | ||||||||||||
| 108 | |||||||||||||
| 109 | 2 | 1; | |||||||||||
| 110 | # NOTE: POD | ||||||||||||
| 111 | __END__ | ||||||||||||