[Webkit-unassigned] [Bug 202044] New: Block scoped variables should be visible across scripts
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Sep 20 05:49:01 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=202044
Bug ID: 202044
Summary: Block scoped variables should be visible across
scripts
Product: WebKit
Version: Safari 12
Hardware: Macintosh
OS: macOS 10.14
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: paul.varna at gmail.com
Const and let should be scoped to global context if used in top level script. (warning, global context is not the same as global object).
Explanation: https://www.youtube.com/watch?v=5LEuJNLfLN0
Reproduction:
<script>
var one = true;
const two = true;
</script>
<script type="module">
var three = true;
const four = true;
</script>
<script type="module">
console.log({ one });
console.log({ two });
console.log({ three }); // should throw
console.log({ four }); // should throw
</script>
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190920/25a147c1/attachment.html>
More information about the webkit-unassigned
mailing list