/[suikacvs]/markup/html/scripting-parser/parser.html
Suika

Diff of /markup/html/scripting-parser/parser.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by wakaba, Fri May 16 10:29:25 2008 UTC revision 1.18 by wakaba, Sun Aug 31 09:46:14 2008 UTC
# Line 312  Line 312 
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)');
# Line 323  Line 323 
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                //                //
# Line 560  Line 560 
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);
# Line 765  Line 765 
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');

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24