--- markup/html/scripting-parser/parser.html 2008/08/31 09:50:49 1.19
+++ markup/html/scripting-parser/parser.html 2008/09/20 13:32:45 1.20
@@ -295,7 +295,7 @@
// 8.1. If the parser were originally created for the ...
if (this.fragmentParsingMode) {
// 8.2. Mark the script element as "already executed" and ...
- el.alreadyExecuted = true;
+ el.manakaiAlreadyExecuted = true;
continue;
}
@@ -521,54 +521,60 @@
var doc = this.ownerDocument || this;
var p = doc._parser;
- // 1. Script type
+ // 1.The script's type
//
- // 2.1. If scripting is disabled
+ // 2. The cript's character encoding
+ //
+
+ // 3.1. If without script
//
// 2.2. If the script element was created by an XML ... innerHTML ...
//
// 2.3. If the user agent does not support the scripting language ...
//
- // 2.4. If the script element has its "already executed" flag set
- if (e.manakaiAlreadyExecuted) {
+ if (false) {
// 2.5. Abort these steps at this point.
- log ('Running a script: aborted (already executed)');
+ log ('Running a script: aborted (noscript)');
logIndentLevel--;
return e;
}
- // 3. Set the element's "already executed" flag.
+ // 4. Set the element's "already executed" flag.
e.manakaiAlreadyExecuted = true;
- // 4. If the element has a src attribute, then a load for ...
+ // 5. If the element has a src attribute, then a load for ...
// TODO: load an external resource
// 5. The first of the following options:
- // 5.1.
if (/* TODO: If the document is still being parsed && */
e.defer && !e.async) {
+ // 6.1.
p.scriptsExecutedAfterParsing.push (e);
log ('Running a script: aborted (defer)');
} else if (e.async && e.src != null) {
+ // 6.2.
p.scriptsExecutedAsynchronously.push (e);
log ('Running a script: aborted (async src)');
} else if (e.async && e.src == null &&
p.scriptsExecutedAsynchronously.length > 0) {
+ // 6.3.
p.scriptsExecutedAsynchronously.push (e);
log ('Running a script: aborted (async)');
- // ISSUE: What is the difference with the case above?
} else if (e.src != null && e.manakaiParserInserted) {
+ // 6.4.
if (p.pendingExternalScript) {
log ('Error: There is a pending external script.');
}
p.pendingExternalScript = e;
log ('Running a script: aborted (src parser-inserted)');
} else if (e.src != null) {
+ // 6.5.
p.scriptsExecutedSoon.push (e);
log ('Running a script: aborted (src)');
} else {
+ // 6.6.
executeScript (doc, e); // even if other scripts are already executing.
}
@@ -950,7 +956,7 @@