New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prototype object of ES6 classes always non-writable #2025
Labels
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
PR: Spec Compliance 👓
A type of pull request used for our changelog categories
Comments
broadsw0rd
changed the title
Prorotype object of ES6 classes are always non-writable
Prorotype object of ES6 classes always non-writable
Jul 17, 2015
Reference: 14.5.14 Runtime Semantics: ClassDefinitionEvaluation
Second argument to |
I can do this for derived classes since they already use a helper and it wouldn't be much extra but I'm not sure if it's worth it for plain classes. |
sebmck
added
the
PR: Spec Compliance 👓
A type of pull request used for our changelog categories
label
Jul 17, 2015
I'm sure this is totally not necessary for |
jamiebuilds
changed the title
Prorotype object of ES6 classes always non-writable
Prototype object of ES6 classes always non-writable
Jul 26, 2015
wentout
added a commit
to wentout/babel
that referenced
this issue
Sep 28, 2020
wentout
added a commit
to wentout/babel
that referenced
this issue
Sep 28, 2020
Started an attempt to fix here: #12115 |
nicolo-ribaudo
added a commit
to wentout/babel
that referenced
this issue
Dec 10, 2021
nicolo-ribaudo
pushed a commit
to wentout/babel
that referenced
this issue
Dec 10, 2021
nicolo-ribaudo
added a commit
that referenced
this issue
Dec 10, 2021
* initial code 2 fix the issue #2025 * Mark class prototype as read-only * Update fixtures * Fix failure * Update Babel 8 fixtures * Disable in loose mode * Update fixtures Co-authored-by: Nicolò Ribaudo <nicolo.ribaudo@gmail.com>
justingrant
added a commit
to justingrant/proposal-temporal
that referenced
this issue
Dec 13, 2021
This PR fixes tc39#1965: 1. For Intl.DateTimeFormat, sets `writeable: false` on `prototype` because it's created using `function` (which has a writeable `prototype`, unlike `class` which is not writeable). 2. For Temporal classes, there's a Babel bug that causes prototypes to be writeable (babel/babel#2025) and this PR works around it.
justingrant
added a commit
to justingrant/proposal-temporal
that referenced
this issue
Dec 14, 2021
This PR fixes tc39#1965: 1. For Intl.DateTimeFormat, sets `writeable: false` on `prototype` because it's created using `function` (which has a writeable `prototype`, unlike `class` which is not writeable). 2. For Temporal classes, there's a Babel bug that causes prototypes to be writeable (babel/babel#2025) and this PR works around it.
justingrant
added a commit
to tc39/proposal-temporal
that referenced
this issue
Dec 14, 2021
This PR fixes #1965: 1. For Intl.DateTimeFormat, sets `writeable: false` on `prototype` because it's created using `function` (which has a writeable `prototype`, unlike `class` which is not writeable). 2. For Temporal classes, there's a Babel bug that causes prototypes to be writeable (babel/babel#2025) and this PR works around it.
github-actions
bot
added
the
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
label
Mar 12, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
PR: Spec Compliance 👓
A type of pull request used for our changelog categories
If we try to compile this snippet with babel, we will get
true
in our console. But if run it in Chrome 43, we will getfalse
.The text was updated successfully, but these errors were encountered: