No "public" API for ajax related functions

No "public" API for ajax related functions

RoyLingRoyLing Posts: 26Questions: 0Answers: 0
edited November 2012 in General
When I dive into the source code of DataTables, there are a lot of "private" functions defined for ajax related, which have a name starting with _.
As naming convention, suppose they are "private" only, right?
If I use them in my application, what should I pay special attention to?

Is there the alternative "public" API for ajax?

Thanks!

Replies

  • allanallan Posts: 63,530Questions: 1Answers: 10,473 Site admin
    > As naming convention, suppose they are "private" only, right?

    Correct

    > If I use them in my application, what should I pay special attention to?

    Upgrading. There is a very decent chance that private variables / names might change between versions.

    > Is there the alternative "public" API for ajax?

    What exactly are you trying to do that can't be done with the public API? With fnServerData and fnServerParams you can define the Ajax call and the data sent. With fnInitComplete you get the initial load data, with the `xhr` event you get told when the Ajax event occurs and with the fnReloadAjax plug-in you can force a reload.

    Allan
  • RoyLingRoyLing Posts: 26Questions: 0Answers: 0
    Thanks Allan for suggesting the public APIs, I will try them out and see if they could address all my issues.
This discussion has been closed.