diff --git a/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js b/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js index 555ff8b3c7781a..01fb366aa86f2d 100644 --- a/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js +++ b/html/semantics/scripting-1/the-script-element/moving-between-documents/resources/moving-between-documents-helper.js @@ -35,30 +35,46 @@ window.didExecute = undefined; // For a script, there are four associated Documents that can // potentially different: +// // [1] script's parser document -// [2] script's node document at the beginning of #prepare-a-script -// == script's preparation-time document +// https://html.spec.whatwg.org/C/#parser-document +// +// [2] script's preparation-time document +// https://html.spec.whatwg.org/C/#preparation-time-document +// == script's node document at the beginning of #prepare-a-script +// // [3] script's node document at the beginning of // #execute-the-script-block // +// This helper is for tests where [1]/[2]/[3] are different. + // In the spec, scripts are not executed only if [1]/[2]/[3] are all the same // (or [1] is null and [2]==[3]). -// [1]==[2] is tested in #prepare-a-script (Step 10), and -// [1]==[3] and [2]==[3] are tested in #execute-the-script-block. // -// This helper is for tests where [1]/[2]/[3] are different. +// A check for [1]==[2] is in #prepare-a-script and +// a check for [1]==[3] is in #execute-the-script-block, +// but these are under debate: https://github.com/whatwg/html/issues/2137 +// +// A check for [2]==[3] is in #execute-the-script-block, which is added by +// https://github.com/whatwg/html/pull/2673 // timing: // "before-prepare": // A