Created
March 12, 2019 12:31
-
-
Save rkeVader/91a244187d60e6328bcc56b8ecde39e3 to your computer and use it in GitHub Desktop.
Revisions
-
rkeVader created this gist
Mar 12, 2019 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ function CreateProperty(O, P, Getter, Setter) { Object.defineProperty(O, P, { get: Getter, set: Setter }); } // CreateProperty // SAMPLE USAGE /* CreateProperty( testclass.prototype, 'TestProp', function() { console.log('TestProp Getter Called'); return this._testProp; }, function(value) { console.log('TestProp Setter Called With [' + value + ']'); this._testProp = value; } ); */