Bug 213244
Summary: | Variables declared with "let" keyword are not recognized by separate .js files | ||
---|---|---|---|
Product: | WebKit | Reporter: | Farley Reynolds <farleykreynolds> |
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | fpizlo, saam, webkit-bug-importer, ysuzuki |
Priority: | P2 | Keywords: | InRadar |
Version: | Safari 13 | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Farley Reynolds
If a variable is declared at the global level with the "let" keyword, functions in other files cannot access it.
If the declaration is changed to use the "var" keyword, the other files are able to access it.
This issue seems to arise when a JavaScript module calls the function that requires the global variable.
I was able to confirm that no other browsers display the issue with the "let" keyword.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/64471510>
Saam Barati
(In reply to Farley Reynolds from comment #0)
> If a variable is declared at the global level with the "let" keyword,
> functions in other files cannot access it.
>
> If the declaration is changed to use the "var" keyword, the other files are
> able to access it.
>
> This issue seems to arise when a JavaScript module calls the function that
> requires the global variable.
>
> I was able to confirm that no other browsers display the issue with the
> "let" keyword.
Can you post an example?