MyDemoClass.include({ // Adding a new property to the class _myPrivateProperty: 78, // Redefining a method myDemoMethod: function() { return this._myPrivateProperty; } }); var mySecondDemoInstance = new MyDemoClass(); // This will output "78" console.log( mySecondDemoInstance.myDemoMethod() ); // However, properties and methods from before still exist // This will output "42" console.log( mySecondDemoInstance.myDemoProperty );
L.Class.include()
Copyright © Since 2014.
开源地理空间基金会中文分会
吉ICP备05002032号
Powered by TorCMS