You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Common up two requirements shared by all three Annex B.3.3 use cases, and use more precise language to specify an antecedent within one of the requirements.
<h1>Block-Level Function Declarations Web Legacy Compatibility Semantics</h1>
36408
-
<p>Prior to ECMAScript 2015, the ECMAScript specification did not define the occurrence of a |FunctionDeclaration| as an element of a |Block| statement's |StatementList|. However, support for that form of |FunctionDeclaration| was an allowable extension and most browser-hosted ECMAScript implementations permitted them. Unfortunately, the semantics of such declarations differ among those implementations. Because of these semantic differences, existing web ECMAScript code that uses |Block| level function declarations is only portable among browser implementation if the usage only depends upon the semantic intersection of all of the browser implementations for such declarations. The following are the use cases that fall within that intersection semantics:</p>
36408
+
<p>Prior to ECMAScript 2015, the ECMAScript specification did not define the occurrence of a |FunctionDeclaration| as an element of a |Block| statement's |StatementList|. However, support for that form of |FunctionDeclaration| was an allowable extension and most browser-hosted ECMAScript implementations permitted them. Unfortunately, the semantics of such declarations differ among those implementations. Because of these semantic differences, existing web ECMAScript code that uses |Block| level function declarations is only portable among browser implementation if the usage only depends upon the semantic intersection of all of the browser implementations for such declarations.</p>
36409
+
<p>These are the threshold requirements for the semantic intersection to potentially occur:</p>
36410
+
<ul>
36411
+
<li>One or more |FunctionDeclaration|s whose |BindingIdentifier| is the name _f_ occur within the function code of an enclosing function _g_.</li>
36412
+
<li>Those |FunctionDeclaration|s are nested within a single |Block|.</li>
36413
+
<li>No other declaration of _f_ that is not a `var` declaration occurs within the function code of _g_.</li>
36414
+
</ul>
36415
+
<p>If those requirements are satisfied, the following use cases fall within the semantic intersection among browser implementations:</p>
36409
36416
<ol>
36410
36417
<li>
36411
36418
<p>A function is declared and only referenced within a single block</p>
36412
36419
<ul>
36413
-
<li>
36414
-
One or more |FunctionDeclaration|s whose |BindingIdentifier| is the name _f_ occur within the function code of an enclosing function _g_ and that declaration is nested within a |Block|.
36415
-
</li>
36416
-
<li>
36417
-
No other declaration of _f_ that is not a `var` declaration occurs within the function code of _g_
36418
-
</li>
36419
36420
<li>
36420
36421
All occurrences of _f_ as an |IdentifierReference| are within the |StatementList| of the |Block| containing the declaration of _f_.
36421
36422
</li>
@@ -36424,12 +36425,6 @@ <h1>Block-Level Function Declarations Web Legacy Compatibility Semantics</h1>
36424
36425
<li>
36425
36426
<p>A function is declared and possibly used within a single |Block| but also referenced by an inner function definition that is not contained within that same |Block|.</p>
36426
36427
<ul>
36427
-
<li>
36428
-
One or more |FunctionDeclaration|s whose |BindingIdentifier| is the name _f_ occur within the function code of an enclosing function _g_ and that declaration is nested within a |Block|.
36429
-
</li>
36430
-
<li>
36431
-
No other declaration of _f_ that is not a `var` declaration occurs within the function code of _g_
36432
-
</li>
36433
36428
<li>
36434
36429
There may be occurrences of _f_ as an |IdentifierReference| within the |StatementList| of the |Block| containing the declaration of _f_.
36435
36430
</li>
@@ -36444,12 +36439,6 @@ <h1>Block-Level Function Declarations Web Legacy Compatibility Semantics</h1>
36444
36439
<li>
36445
36440
<p>A function is declared and possibly used within a single block but also referenced within subsequent blocks.</p>
36446
36441
<ul>
36447
-
<li>
36448
-
One or more |FunctionDeclaration| whose |BindingIdentifier| is the name _f_ occur within the function code of an enclosing function _g_ and that declaration is nested within a |Block|.
36449
-
</li>
36450
-
<li>
36451
-
No other declaration of _f_ that is not a `var` declaration occurs within the function code of _g_
36452
-
</li>
36453
36442
<li>
36454
36443
There may be occurrences of _f_ as an |IdentifierReference| within the |StatementList| of the |Block| containing the declaration of _f_.
0 commit comments