|
|
|
NOTE 1 NOTE 2 A Directive Prologue s or s of a , or a and where each consists entirely of a token followed by a semicolon. The semicolon may appear explicitly or may be inserted by automatic semicolon insertion ( A Use Strict Directive is an whose is either of the exact code point sequences "use strict" "use strict" or 'use strict' 'use strict' may contain more than one . However, an implementation may issue a warning if this occurs. NOTE An ECMAScript syntactic unit may be processed using either unrestricted or strict mode syntax and semantics ( Code is interpreted as strict mode code in the following situations: Global code is strict mode code if it begins with a Module code is always strict mode code. are strict mode code. Eval code is strict mode code if it begins with a or if the call to eval eval that is contained in strict mode code. Function code is strict mode code if the associated , , is contained in strict mode code or if the code that produces the value of the function's [[ECMAScriptCode]] internal slot begins with a Function code is generally provided as the bodies of Function Definitions ( ), Arrow Function Definitions ( ), Generator Function Definitions ( Function Definitions ( ), Async Generator Function Definitions ( ). Function code is also derived from the arguments to the Function ), and the AsyncFunction The practical effect of including the in function code is that the Early Errors for are applied to a that is the name of a function whose body contains a "use strict" directive, even if the surrounding code is not . are evaluated normally during evaluation of the containing production. Implementations may define implementation specific meanings for s which are not a . If an appropriate notification mechanism exists, an implementation should issue a warning if it an which does not have a meaning defined by the implementation. 11.2.1 Directive Prologues and the Use Strict Directive 11.2.2 Strict Mode Code 275 |