Created
January 14, 2017 05:11
-
-
Save triacontane/4074c17b3c17ce7e8eb00dafb75a9006 to your computer and use it in GitHub Desktop.
ES2015のclass構文はシンタックスシュガーなので、ES5の通常の記述で再定義可能です。
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
class Test { | |
static aaa() { | |
alert('aaa'); | |
} | |
} | |
var _Test_aaa = Test.aaa; | |
Test.aaa = function() { | |
_Test_aaa.apply(this, arguments); | |
alert('bbb'); | |
}; | |
Test.aaa(); // 'aaa' 'bbb' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment