3466 |
## When an interactive UA render the $self->{document} available |
## When an interactive UA render the $self->{document} available |
3467 |
## to the user, or when it begin accepting user input, are |
## to the user, or when it begin accepting user input, are |
3468 |
## not defined. |
## not defined. |
|
|
|
|
## Append a character: collect it and all subsequent consecutive |
|
|
## characters and insert one Text node whose data is concatenation |
|
|
## of all those characters. # MUST |
|
3469 |
|
|
3470 |
!!!next-token; |
!!!next-token; |
3471 |
|
|
4354 |
} |
} |
4355 |
}; # $insert_to_foster |
}; # $insert_to_foster |
4356 |
|
|
4357 |
## NOTE: When a character is inserted, if the last node that was |
## NOTE: Insert a character (MUST): When a character is inserted, if |
4358 |
## inserted by the parser is a Text node and the character has to be |
## the last node that was inserted by the parser is a Text node and |
4359 |
## inserted after that node, then the character is appended to the |
## the character has to be inserted after that node, then the |
4360 |
## Text node. However, if any other node is inserted by the parser, |
## character is appended to the Text node. However, if any other |
4361 |
## then a new Text node is created and the character is appended as |
## node is inserted by the parser, then a new Text node is created |
4362 |
## that Text node. If I'm not wrong, there are only two cases where |
## and the character is appended as that Text node. If I'm not |
4363 |
## this occurs. One is the case where an element node is inserted |
## wrong, for a parser with scripting disabled, there are only two |
4364 |
## to the |head| element. This is covered by using the |
## cases where this occurs. One is the case where an element node |
4365 |
|
## is inserted to the |head| element. This is covered by using the |
4366 |
## |$self->{head_element_inserted}| flag. Another is the case where |
## |$self->{head_element_inserted}| flag. Another is the case where |
4367 |
## an element or comment is inserted into the |table| subtree while |
## an element or comment is inserted into the |table| subtree while |
4368 |
## foster parenting happens. This is covered by using the [2] flag |
## foster parenting happens. This is covered by using the [2] flag |
4369 |
## of the |$open_tables| structure. All other cases are handled |
## of the |$open_tables| structure. All other cases are handled |
4370 |
## simply by calling |manakai_append_text| method. |
## simply by calling |manakai_append_text| method. |
4371 |
|
|
4372 |
|
## TODO: |<body><script>document.write("a<br>"); |
4373 |
|
## document.body.removeChild (document.body.lastChild); |
4374 |
|
## document.write ("b")</script>| |
4375 |
|
|
4376 |
B: while (1) { |
B: while (1) { |
4377 |
if ($token->{type} == DOCTYPE_TOKEN) { |
if ($token->{type} == DOCTYPE_TOKEN) { |
4378 |
!!!cp ('t73'); |
!!!cp ('t73'); |