如何调用在匿名函数内部但都在同一个 JS 文件中定义的函数。这是我的代码片段。如何拨打_testMethodInside()
电话testMethodOutside()
?
// Line 1 to 13 is an existing code from ESRI API
define([
"dojo/_base/declare",
"dojo/_base/html"
], function (
declare,
html
) {
return declare([_WidgetBase, _TemplatedMixin], {
_testMethodInside: function () {
return 'success';
}
});
});
//Call above using this function
function testMethodOutside(){
//How to call _testMethodInside() function from here
}