I have some task to solve with jquery DataTables we use on our application. I need to add a feature, the DataTables currently seems not have. To build this feature I tried to debug to understand framework structure and often confused, because while call a method it often lends to function with different name and arguments structure. Why this happen? Here sample: Here call to put data in table
Step into in debugger and I get to confusing place:
- I get in anonymous function instead of add method called. This could be if add method was assigned with this anonymous method. Right?
- Why it takes two arguments? Why data.data argument appears on second place instead of first? I know javaScript allows to use different arguments number in method but what about change argument place?
- The anonymous function I'm currently in, returned from outer wrapper function which assigned to methodScoping variable. Why to wrap in this manner and return?
May be here used some design pattern I cannot identify. Please help.
Aucun commentaire:
Enregistrer un commentaire