39 |
|
|
40 |
if ({ |
if ({ |
41 |
## Read-only attributes (trivial accessors) |
## Read-only attributes (trivial accessors) |
42 |
|
default_view => 1, |
43 |
implementation => 1, |
implementation => 1, |
44 |
}->{$method_name}) { |
}->{$method_name}) { |
45 |
no strict 'refs'; |
no strict 'refs'; |
51 |
goto &{ $AUTOLOAD }; |
goto &{ $AUTOLOAD }; |
52 |
} elsif ({ |
} elsif ({ |
53 |
## Read-write attributes (DOMString, trivial accessors) |
## Read-write attributes (DOMString, trivial accessors) |
54 |
|
manakai_charset => 1, |
55 |
document_uri => 1, |
document_uri => 1, |
56 |
input_encoding => 1, |
input_encoding => 1, |
57 |
}->{$method_name}) { |
}->{$method_name}) { |
79 |
} elsif ({ |
} elsif ({ |
80 |
## Read-write attributes (boolean, trivial accessors) |
## Read-write attributes (boolean, trivial accessors) |
81 |
all_declarations_processed => 1, |
all_declarations_processed => 1, |
82 |
|
manakai_has_bom => 1, |
83 |
}->{$method_name}) { |
}->{$method_name}) { |
84 |
no strict 'refs'; |
no strict 'refs'; |
85 |
eval qq{ |
eval qq{ |
124 |
create_tree_walker => 'Message::DOM::TreeWalker', |
create_tree_walker => 'Message::DOM::TreeWalker', |
125 |
query_selector => 'Message::DOM::SelectorsAPI', |
query_selector => 'Message::DOM::SelectorsAPI', |
126 |
query_selector_all => 'Message::DOM::SelectorsAPI', |
query_selector_all => 'Message::DOM::SelectorsAPI', |
127 |
|
___query_selector_all => 'Message::DOM::SelectorsAPI', |
128 |
}->{$method_name}) { |
}->{$method_name}) { |
129 |
eval qq{ require $module_name } or die $@; |
eval qq{ require $module_name } or die $@; |
130 |
goto &{ $AUTOLOAD }; |
goto &{ $AUTOLOAD }; |
218 |
-object => $self, |
-object => $self, |
219 |
-type => 'NOT_SUPPORTED_ERR', |
-type => 'NOT_SUPPORTED_ERR', |
220 |
-subtype => 'ADOPT_NODE_TYPE_NOT_SUPPORTED_ERR'; |
-subtype => 'ADOPT_NODE_TYPE_NOT_SUPPORTED_ERR'; |
|
## ISSUE: Define ELEMENT_TYPE_DEFINITION_NODE and ATTRIBUTE_DEFINITION_NODE |
|
221 |
} |
} |
222 |
|
|
223 |
my @change_od; |
my @change_od; |
817 |
## NOTE: A manakai extension. |
## NOTE: A manakai extension. |
818 |
sub all_declarations_processed ($;$); |
sub all_declarations_processed ($;$); |
819 |
|
|
820 |
|
## TODO: documentation |
821 |
|
sub manakai_charset ($;$); |
822 |
|
|
823 |
sub doctype ($) { |
sub doctype ($) { |
824 |
my $self = $_[0]; |
my $self = $_[0]; |
825 |
for (@{$self->child_nodes}) { |
for (@{$self->child_nodes}) { |
872 |
} |
} |
873 |
} # manakai_entity_base_uri |
} # manakai_entity_base_uri |
874 |
|
|
875 |
|
## TODO: documentation |
876 |
|
sub manakai_has_bom ($;$); |
877 |
|
|
878 |
sub input_encoding ($;$); |
sub input_encoding ($;$); |
879 |
|
|
880 |
sub strict_error_checking ($;$) { |
sub strict_error_checking ($;$) { |
1085 |
|
|
1086 |
sub create_tree_walker ($$;$$$); |
sub create_tree_walker ($$;$$$); |
1087 |
|
|
1088 |
|
## |DocumentView| attribute |
1089 |
|
|
1090 |
|
sub default_view ($); |
1091 |
|
|
1092 |
## |HTMLDocument| attributes |
## |HTMLDocument| attributes |
1093 |
|
|
1094 |
sub compat_mode ($) { |
sub compat_mode ($) { |
1113 |
} |
} |
1114 |
} # manakai_compat_mode |
} # manakai_compat_mode |
1115 |
|
|
1116 |
|
## TODO: documentation |
1117 |
|
sub manakai_head ($) { |
1118 |
|
local $Error::Depth = $Error::Depth + 1; |
1119 |
|
my $html = $_[0]->manakai_html; |
1120 |
|
return undef unless defined $html; |
1121 |
|
for my $el (@{$html->child_nodes}) { |
1122 |
|
next unless $el->node_type == 1; # ELEMENT_NODE |
1123 |
|
my $nsuri = $el->namespace_uri; |
1124 |
|
next unless defined $nsuri; |
1125 |
|
next unless $nsuri eq q<http://www.w3.org/1999/xhtml>; |
1126 |
|
next unless $el->manakai_local_name eq 'head'; |
1127 |
|
return $el; |
1128 |
|
} |
1129 |
|
return undef; |
1130 |
|
} # manakai_head |
1131 |
|
|
1132 |
|
## TODO: documentation |
1133 |
|
sub manakai_html ($) { |
1134 |
|
local $Error::Depth = $Error::Depth + 1; |
1135 |
|
my $de = $_[0]->document_element; |
1136 |
|
my $nsuri = $de->namespace_uri; |
1137 |
|
if (defined $nsuri and $nsuri eq q<http://www.w3.org/1999/xhtml> and |
1138 |
|
$de->manakai_local_name eq 'html') { |
1139 |
|
return $de; |
1140 |
|
} else { |
1141 |
|
return undef; |
1142 |
|
} |
1143 |
|
} # manakai_html |
1144 |
|
|
1145 |
sub inner_html ($;$) { |
sub inner_html ($;$) { |
1146 |
my $self = $_[0]; |
my $self = $_[0]; |
1147 |
local $Error::Depth = $Error::Depth + 1; |
local $Error::Depth = $Error::Depth + 1; |
1168 |
return unless defined wantarray; |
return unless defined wantarray; |
1169 |
} |
} |
1170 |
|
|
1171 |
return ${ Whatpm::HTML->get_inner_html ($self) }; |
require Whatpm::HTML::Serializer; |
1172 |
|
return ${ Whatpm::HTML::Serializer->get_inner_html ($self) }; |
1173 |
} else { |
} else { |
1174 |
if (@_ > 1) { |
if (@_ > 1) { |
1175 |
## Step 1 |
## Step 1 |