Bug 159270 - Spurious "Can't create duplicate variable that shadows a global property"
Summary: Spurious "Can't create duplicate variable that shadows a global property"
Status: RESOLVED DUPLICATE of bug 148763
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: Safari Technology Preview
Hardware: Mac OS X 10.11
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-29 12:44 PDT by Domenic Denicola
Modified: 2016-06-29 22:44 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Domenic Denicola 2016-06-29 12:44:36 PDT
https://settings-object-worker-client-ckrcsrtdqr.now.sh/ (source at https://settings-object-worker-client-ckrcsrtdqr.now.sh/_src) triggers "SyntaxError: Can't create duplicate variable that shadows a global property: 'c'"

The window has a named property 'c' since I declare an <iframe> with id="c". But then I tried to do `const c = document.querySelector("#c").contentWindow` and got that error.

That error does not appear in other browsers, and I believe has no support in the specs. (Not that window.c is supposed to be configurable.)
Comment 1 Saam Barati 2016-06-29 22:43:50 PDT
Indeed. This is wrong and we already have a bug open to fix it.
Comment 2 Saam Barati 2016-06-29 22:44:37 PDT

*** This bug has been marked as a duplicate of bug 148763 ***