Private Fields and Private methods are the two remaining pieces of the Class Fields Proposal [1] in JavaScript we need to ship. The Class Fields proposal will shortly be Stage 4 of the TC39 process.
Bug(s):
* Private-fields: https://bugzilla.mozilla.org/show_bug.cgi?id=1562054
* Private-methods: https://bugzilla.mozilla.org/show_bug.cgi?id=1435826
Proposed Standard: https://tc39.es/proposal-class-fields/
Proposal Repository: https://github.com/tc39/proposal-class-fields
MDN:
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Public_class_fields
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes/Private_class_fields
Platform coverage: all platforms
DevTools Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1650188
Other Browsers: Shipping by default in Chrome 84 and Safari Technical Preview 122.
Testing: Test262 Tests
https://github.com/tc39/test262/pull/2963
Secure contexts: This is a JS language feature and is therefore present in all contexts.