Skip to content

Commit

Permalink
[e] (2) Remove excessive 'must's in the Document.innerHTML setter; be…
Browse files Browse the repository at this point in the history
… more explicit about the handling of </foo> in the innerHTML parse case when <foo> is not a PCDATA element (e.g. setting a SCRIPT element's innerHTML to '</script>').

git-svn-id: http://svn.whatwg.org/webapps@923 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 19, 2007
1 parent 8b6a3c2 commit 0fbc6b4
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 53 deletions.
51 changes: 28 additions & 23 deletions index
Original file line number Diff line number Diff line change
Expand Up @@ -3873,40 +3873,42 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..

<ol>
<li>
<p>Otherwise, if the document has an <span>active
parser</span><!--XXX xref-->, then stop that parser, and throw away any
pending content in the input stream. <span class=big-issue>what about if
it doesn't, because it's either like a text/plain, or Atom, or PDF, or
XHTML, or image document, or something?</span></p>
<!-- XXX see also document.open() -->
<p>If the document has an <span>active parser</span><!--XXX
xref-->,
then stop that parser, and throw away any pending content in the input
stream. <span class=big-issue>what about if it doesn't, because it's
either like a text/plain, or Atom, or PDF, or XHTML, or image document,
or something?</span></p>
<!-- XXX see
also document.open() -->

<li>
<p>The user agent must remove the children nodes of the
<code>Document</code> whose <code title=dom-innerHTML-HTML><a
href="#innerhtml0">innerHTML</a></code> attribute is being set.</p>
<p>Remove the children nodes of the <code>Document</code> whose <code
title=dom-innerHTML-HTML><a href="#innerhtml0">innerHTML</a></code>
attribute is being set.</p>

<li>
<p>The user agent must create a new <a href="#html-0">HTML parser</a>, in
its initial state, and associate it with the <code>Document</code> node.</p>
<p>Create a new <a href="#html-0">HTML parser</a>, in its initial state,
and associate it with the <code>Document</code> node.</p>
</li>
<!-- redundant, the document is forcably already so labelled if we get here
<li>

<p>The user agent must mark the <code>Document</code> object as
being an <span title="HTML documents">HTML document</span>.</p>
<p>Mark the <code>Document</code> object as being an <span
title="HTML documents">HTML document</span>.</p>

</li>
-->

<li>
<p>The user agent must place into the <a href="#input0">input stream</a>
for the <a href="#html-0">HTML parser</a> just created the string being
assigned into the <code title=dom-innerHTML-HTML><a
<p>Place into the <a href="#input0">input stream</a> for the <a
href="#html-0">HTML parser</a> just created the string being assigned
into the <code title=dom-innerHTML-HTML><a
href="#innerhtml0">innerHTML</a></code> attribute.</p>

<li>
<p>The user agent must start the parser and let it run until it has
consumed all the characters just inserted into the input stream. (The
<p>Start the parser and let it run until it has consumed all the
characters just inserted into the input stream. (The
<code>Document</code> node will have been populated with elements and a
<code title=event-load><a href="#load0">load</a></code> event will have
fired on <a href="#the-body0" title="the body element">its body
Expand Down Expand Up @@ -33756,10 +33758,13 @@ function receiver(e) {

<dd>
<p>If the <a href="#content2">content model flag</a> is set to the RCDATA
or CDATA states then examine the next few characters. If they do not
match the tag name of the last start tag token emitted (case
insensitively), or if they do but they are not immediately followed by
one of the following characters:</p>
or CDATA states but no start tag token has ever been emitted by this
instance of the tokeniser (<a href="#innerhtml1">innerHTML case</a>),
or, if the <a href="#content2">content model flag</a> is set to the
RCDATA or CDATA states and the next few characters do not match the tag
name of the last start tag token emitted (case insensitively), or if
they do but they are not immediately followed by one of the following
characters:</p>

<ul class=brief>
<li>U+0009 CHARACTER TABULATION
Expand All @@ -33780,7 +33785,7 @@ function receiver(e) {
<li>EOF
</ul>

<p>...emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
<p>...then emit a U+003C LESS-THAN SIGN character token, a U+002F SOLIDUS
character token, and switch to the <a href="#data-state">data state</a>
to process the <a href="#next-input">next input character</a>.</p>

Expand Down
59 changes: 29 additions & 30 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -2463,58 +2463,54 @@ http://software.hixie.ch/utilities/js/live-dom-viewer/?%3C%21DOCTYPE%20html%3E..

<li>

<p>Otherwise, if the document has an <span>active
parser</span><!--XXX xref-->, then stop that parser, and throw
away any pending content in the input stream. <span
class="big-issue">what about if it doesn't, because it's either
like a text/plain, or Atom, or PDF, or XHTML, or image document,
or something?</span></p><!-- XXX see also document.open() -->
<p>If the document has an <span>active parser</span><!--XXX
xref-->, then stop that parser, and throw away any pending content
in the input stream. <span class="big-issue">what about if it
doesn't, because it's either like a text/plain, or Atom, or PDF,
or XHTML, or image document, or something?</span></p><!-- XXX see
also document.open() -->

</li>

<li>

<p>The user agent must remove the children nodes of the
<code>Document</code> whose <code
title="dom-innerHTML-HTML">innerHTML</code> attribute is being
set.</p>
<p>Remove the children nodes of the <code>Document</code> whose
<code title="dom-innerHTML-HTML">innerHTML</code> attribute is
being set.</p>

</li>

<li>

<p>The user agent must create a new <span>HTML parser</span>, in
its initial state, and associate it with the
<code>Document</code> node.</p>
<p>Create a new <span>HTML parser</span>, in its initial state,
and associate it with the <code>Document</code> node.</p>

</li>

<!-- redundant, the document is forcably already so labelled if we get here
<li>

<p>The user agent must mark the <code>Document</code> object as
being an <span title="HTML documents">HTML document</span>.</p>
<p>Mark the <code>Document</code> object as being an <span
title="HTML documents">HTML document</span>.</p>

</li>
-->

<li>

<p>The user agent must place into the <span>input stream</span>
for the <span>HTML parser</span> just created the string being
assigned into the <code
title="dom-innerHTML-HTML">innerHTML</code> attribute.</p>
<p>Place into the <span>input stream</span> for the <span>HTML
parser</span> just created the string being assigned into the
<code title="dom-innerHTML-HTML">innerHTML</code> attribute.</p>

</li>

<li>

<p>The user agent must start the parser and let it run until it
has consumed all the characters just inserted into the input
stream. (The <code>Document</code> node will have been populated
with elements and a <code title="event-load">load</code> event
will have fired on <span title="the body element">its body
element</span>.)</p>
<p>Start the parser and let it run until it has consumed all the
characters just inserted into the input stream. (The
<code>Document</code> node will have been populated with elements
and a <code title="event-load">load</code> event will have fired
on <span title="the body element">its body element</span>.)</p>

</li>

Expand Down Expand Up @@ -31384,10 +31380,13 @@ function receiver(e) {
<dd>

<p>If the <span>content model flag</span> is set to the RCDATA or
CDATA states then examine the next few characters. If they do not
match the tag name of the last start tag token emitted (case
insensitively), or if they do but they are not immediately
followed by one of the following characters:</p>
CDATA states but no start tag token has ever been emitted by this
instance of the tokeniser (<span>innerHTML case</span>), or, if
the <span>content model flag</span> is set to the RCDATA or CDATA
states and the next few characters do not match the tag name of
the last start tag token emitted (case insensitively), or if they
do but they are not immediately followed by one of the following
characters:</p>

<ul class="brief">
<li>U+0009 CHARACTER TABULATION</li>
Expand All @@ -31401,7 +31400,7 @@ function receiver(e) {
<li>EOF</li>
</ul>

<p>...emit a U+003C LESS-THAN SIGN character token, a U+002F
<p>...then emit a U+003C LESS-THAN SIGN character token, a U+002F
SOLIDUS character token, and switch to the <span>data state</span>
to process the <span>next input character</span>.</p>

Expand Down

0 comments on commit 0fbc6b4

Please sign in to comment.