Disallow Adding New Private Fields to Non-extensible Objects
- Category
- JavaScript
- Type
- Chromium catches up
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
Prevent stamping private fields to non-extensible object. This proposal proposes to change the behavior of non-extensibility to also apply to private fields. That is, to make it so that private fields cannot be added to non-extensible objects.
Standards & signals
- Specification: https://tc39.es/proposal-nonextensible-applies-to-private
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=disallow-adding-new-private-fields-to-non-extensible-objects
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+Disallow%20Adding%20New%20Private%20Fields%20to%20Non-extensible%20Objects
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=Disallow%20Adding%20New%20Private%20Fields%20to%20Non-extensible%20Objects
- Baseline status: https://webstatus.dev/?q=Disallow%20Adding%20New%20Private%20Fields%20to%20Non-extensible%20Objects
Explainers: https://github.com/tc39/proposal-nonextensible-applies-to-private