Is there any official and centralised documentation about AJS like there is for AP (

While developing server apps, one relies heavily on AJS. I’ve searched through the internet and just realised I cannot find any centralised documentation on AJS like we have for Cloud AP ( I think it just occurred to me that all this while of using AJS I might have been using knowledge scattered everywhere on the internet to use the AJS library.

If there is such centralised AJS documentation, please can someone kindly point me to it?

Please, I’m not referring to AUI because from my understanding, that depends on some parts of . AJS but still doesn’t really document AJS.

Thanks Daniel :raised_hands:. Please is there documentation for AJS.toInit anywhere there? I cannot seem to find it.

There’s this:

Please be reminded to use the toInit method everytime AJS is called. This will ensure that the JQuery codes are called only after AJS has been succesfully initialized. In order to use the toInit method, include the following:


And this:

The recommended way to load scripts when the page is ready, known as ‘on-DOM-ready’, is to use the Atlassian JavaScript (AJS) abstraction. This avoids depending on a particular JavaScript library that may not remain in Confluence.

AJS.toInit(function () {
    // ... your initialisation code here

This has the additional benefit of ensuring any functions or variables you declare here are not in the global scope, which is important for best interoperability with other plugins in Confluence.

1 Like