312 |
oldInsertionPoint += this.insertionPoint; |
oldInsertionPoint += this.insertionPoint; |
313 |
this.setInsertionPoint (oldInsertionPoint); |
this.setInsertionPoint (oldInsertionPoint); |
314 |
|
|
315 |
// 12. If there is a script that will execute as soon as ... |
// 12. If there is a pending external script |
316 |
while (this.scriptExecutedWhenParserResumes) { |
while (this.pendingExternalScript) { |
317 |
// 12.1. If the tree construction stage is being called reentrantly |
// 12.1. If the tree construction stage is being called reentrantly |
318 |
if (this.reentrant) { |
if (this.reentrant) { |
319 |
log ('parse: abort (reentrance)'); |
log ('parse: abort (reentrance)'); |
323 |
// 12.2. Otherwise |
// 12.2. Otherwise |
324 |
} else { |
} else { |
325 |
// 1. |
// 1. |
326 |
var script = this.scriptExecutedWhenParserResumes; |
var script = this.pendingExternalScript; |
327 |
this.scriptExecutedWhenParserResumes = null; |
this.pendingExternalScript = null; |
328 |
|
|
329 |
// 2. Pause until the script has completed loading. |
// 2. Pause until the script has completed loading. |
330 |
// |
// |
560 |
log ('Running a script: aborted (async)'); |
log ('Running a script: aborted (async)'); |
561 |
// ISSUE: What is the difference with the case above? |
// ISSUE: What is the difference with the case above? |
562 |
} else if (e.src != null && e.manakaiParserInserted) { |
} else if (e.src != null && e.manakaiParserInserted) { |
563 |
if (p.scriptExecutedWhenParserResumes) { |
if (p.pendingExternalScript) { |
564 |
log ('Error: There is a script that will execute as soon as the parser resumes.'); |
log ('Error: There is a pending external script.'); |
565 |
} |
} |
566 |
p.scriptExecutedWhenParserResumes = e; |
p.pendingExternalScript = e; |
567 |
log ('Running a script: aborted (src parser-inserted)'); |
log ('Running a script: aborted (src parser-inserted)'); |
568 |
} else if (e.src != null) { |
} else if (e.src != null) { |
569 |
p.scriptsExecutedSoon.push (e); |
p.scriptsExecutedSoon.push (e); |
598 |
} |
} |
599 |
|
|
600 |
// If the load was successful |
// If the load was successful |
|
log ('load event fired at the script element'); |
|
601 |
|
|
602 |
if (true) { |
if (true) { |
603 |
// Scripting is enabled, Document.designMode is disabled, |
// Scripting is enabled, Document.designMode is disabled, |
606 |
parseAndRunScript (doc, s); |
parseAndRunScript (doc, s); |
607 |
} |
} |
608 |
|
|
609 |
|
log ('load event fired at the script element'); |
610 |
|
|
611 |
log ('executing a script block: end'); |
log ('executing a script block: end'); |
612 |
} // executeScript |
} // executeScript |
613 |
|
|
765 |
+ p.input.s.substring (p.insertionPoint, p.input.s.length); |
+ p.input.s.substring (p.insertionPoint, p.input.s.length); |
766 |
p.insertionPoint += s.length; |
p.insertionPoint += s.length; |
767 |
|
|
768 |
// 3. If there is a script that will execute as soon as the parser resumes |
// 3. If there is a pending external script |
769 |
if (p.scriptExecutedAfterParserResumes) { |
if (p.pendingExternalScript) { |
770 |
log ('document.write: processed later (there is an unprocessed <script src>)'); |
log ('document.write: processed later (there is an unprocessed <script src>)'); |
771 |
logIndentLevel--; |
logIndentLevel--; |
772 |
log ('document.write: return'); |
log ('document.write: return'); |
897 |
algorithm, and so on. |
algorithm, and so on. |
898 |
<li>Does not raise parse errors for invalid attribute specifications in start |
<li>Does not raise parse errors for invalid attribute specifications in start |
899 |
or end tags. |
or end tags. |
900 |
<li>Does not support PCDATA elements (<code>title</code> and |
<li>Does not support RCDATA elements (<code>title</code> and |
901 |
<code>textarea</code>). |
<code>textarea</code>). |
902 |
<li>Does not strip the first newline in <code>pre</code> elements. |
<li>Does not strip the first newline in <code>pre</code>, |
903 |
|
<code>listing</code>, and <code>textarea</code> elements. |
904 |
<li>Does not support <code><!--</code>..<code>--></code> parsing rule |
<li>Does not support <code><!--</code>..<code>--></code> parsing rule |
905 |
in <code>script</code> element. |
in CDATA/RCDATA elements. |
906 |
<li>Does not support foreign (SVG or MathML) elements. |
<li>Does not support foreign (SVG or MathML) elements. |
907 |
<li>Only supports <code>script</code> <code>type</code> |
<li>Only supports <code>script</code> <code>type</code> |
908 |
<code>text/javascript</code>. <code>type</code> and <code>language</code> |
<code>text/javascript</code>. <code>type</code> and <code>language</code> |