Hello everyone!
I test plugins for editor and my next question about debugging of the js code in devtools.
My plugin has the next code:
(function(window, undefined) {
window.Asc.plugin.init = function() {
var comment = document.getElementById("textareaIDComment");
document.getElementById("buttonIDAddComment").onclick = function() {
Asc.scope.textComment = comment.value; // export variable to plugin scope
window.Asc.plugin.callCommand(filling, true);
};
};
window.Asc.plugin.button = function() {
this.executeCommand("close", "");
};
function filling()
{
//here is something code
};
})(window, undefined);
When i try see work of the program step-by-step in debugger i see that my filling function transfer to the “window.Asc.plugin.callCommand” method and that is all. Next step is result of my function on the table sheet. As i understand my filling function transfer to callCommand method as instance not as link and i can’t see debugging in my main js code.
May be i not understand logic of work JS and i want your advise.
How i can debug the code which is under comment “here is something …” of the code above?