147 |
$self->{parse_error} = sub { |
$self->{parse_error} = sub { |
148 |
# |
# |
149 |
}; |
}; |
150 |
|
$self->{application_cache_selection} = sub { |
151 |
|
# |
152 |
|
}; |
153 |
return $self; |
return $self; |
154 |
} # new |
} # new |
155 |
|
|
2098 |
redo B; |
redo B; |
2099 |
} |
} |
2100 |
} |
} |
2101 |
|
|
2102 |
|
$self->{application_cache_selection}->(undef); |
2103 |
|
|
2104 |
|
# |
2105 |
|
} elsif ($token->{type} == START_TAG_TOKEN) { |
2106 |
|
if ($token->{tag_name} eq 'html' and |
2107 |
|
$token->{attributes}->{manifest}) { ## ISSUE: Spec spells as "application" |
2108 |
|
$self->{application_cache_selection} |
2109 |
|
->($token->{attributes}->{manifest}->{value}); |
2110 |
|
## ISSUE: No relative reference resolution? |
2111 |
|
} else { |
2112 |
|
$self->{application_cache_selection}->(undef); |
2113 |
|
} |
2114 |
|
|
2115 |
|
## ISSUE: There is an issue in the spec |
2116 |
# |
# |
2117 |
} elsif ({ |
} elsif ({ |
|
START_TAG_TOKEN, 1, |
|
2118 |
END_TAG_TOKEN, 1, |
END_TAG_TOKEN, 1, |
2119 |
END_OF_FILE_TOKEN, 1, |
END_OF_FILE_TOKEN, 1, |
2120 |
}->{$token->{type}}) { |
}->{$token->{type}}) { |
2121 |
|
$self->{application_cache_selection}->(undef); |
2122 |
|
|
2123 |
## ISSUE: There is an issue in the spec |
## ISSUE: There is an issue in the spec |
2124 |
# |
# |
2125 |
} else { |
} else { |
2126 |
die "$0: $token->{type}: Unknown token type"; |
die "$0: $token->{type}: Unknown token type"; |
2127 |
} |
} |
2128 |
## TODO: application cache selection algorithm |
|
2129 |
my $root_element; !!!create-element ($root_element, 'html'); |
my $root_element; !!!create-element ($root_element, 'html'); |
2130 |
$self->{document}->append_child ($root_element); |
$self->{document}->append_child ($root_element); |
2131 |
push @{$self->{open_elements}}, [$root_element, 'html']; |
push @{$self->{open_elements}}, [$root_element, 'html']; |