forked from tj/commander.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Return proxy from constructor further up the prototype chain
Borrowed from eb142d8 that was supposed to land in the now-closed tj#1921. The change ensures the this object used in Command is the proxy from the very beginning, even in the constructor. This solves pretty much all issues with returning the proxy from a constructor. For example, private fields can be used now. More details available at: tj#1921 (comment) Additionally, the ownKeys() trap and wrong spelling in comments have been fixed (the former change being borrowed from fc927c8).
- Loading branch information
Showing
1 changed file
with
71 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters