google / google/closure-compiler

Quoted ES6 Getters/Setters Transpiled to Unquoted

Open
#2,282 1 comment 0 reactions 0 assignees View on GitHub
bug ES6
Dominant language
JavaScript
Stars
7.7k
Forks
1.2k
Avg merge
2d 12h
Merged PRs (30d)
6

Description

```js
class Foo extends HTMLElement {
get 'foobar'() { return 'foobar'; }

attachedCallback() {
this.addEventListener('click', () => {
console.log(this['foobar']);
}, false);
}
}
window['Foo'] = Foo;
```

The transpiled getter for `foobar` is not properly quoted.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.