| 2434 |
} elsif ({ |
} elsif ({ |
| 2435 |
base => 1, link => 1, meta => 1, |
base => 1, link => 1, meta => 1, |
| 2436 |
}->{$token->{tag_name}}) { |
}->{$token->{tag_name}}) { |
|
!!!parse-error (type => 'in body:'.$token->{tag_name}); |
|
| 2437 |
## NOTE: This is an "as if in head" code clone |
## NOTE: This is an "as if in head" code clone |
| 2438 |
my $el; |
my $el; |
| 2439 |
!!!create-element ($el, $token->{tag_name}, $token->{attributes}); |
!!!create-element ($el, $token->{tag_name}, $token->{attributes}); |
| 2440 |
if (defined $self->{head_element}) { |
if ($self->{insertion_mode} eq 'in head' and |
| 2441 |
|
defined $self->{head_element}) { |
| 2442 |
$self->{head_element}->append_child ($el); |
$self->{head_element}->append_child ($el); |
| 2443 |
} else { |
} else { |
| 2444 |
$insert->($el); |
$insert->($el); |
| 3415 |
## NOTE: There are "as if in head" code clones |
## NOTE: There are "as if in head" code clones |
| 3416 |
my $el; |
my $el; |
| 3417 |
!!!create-element ($el, $token->{tag_name}, $token->{attributes}); |
!!!create-element ($el, $token->{tag_name}, $token->{attributes}); |
| 3418 |
(defined $self->{head_element} ? $self->{head_element} : $self->{open_elements}->[-1]->[0]) |
if ($self->{insertion_mode} eq 'in head' and |
| 3419 |
->append_child ($el); |
defined $self->{head_element}) { |
| 3420 |
|
$self->{head_element}->append_child ($el); |
| 3421 |
|
} else { |
| 3422 |
|
$self->{open_elements}->[-1]->[0]->append_child ($el); |
| 3423 |
|
} |
| 3424 |
|
|
| 3425 |
!!!next-token; |
!!!next-token; |
| 3426 |
redo B; |
redo B; |