Uploaded image for project: 'Confluence Cloud'
  1. Confluence Cloud
  2. CONFCLOUD-71211

Enhance AP.confluence operations to support promises

XMLWordPrintable

    • Our product teams collect and evaluate feedback from a number of different sources. To learn more about how we use customer feedback in the planning process, check out our new feature policy.

      Many JavaScript APIs support promises. For example, the context API supports the provision of a callback or using promises. However, AP.confluence operations only support callback.

       

      AP.context.getContext(console.log); // OK
      AP.context.getContext().then(context => {console.log(JSON.stringify(context, null, 2))}); // OK
      
      AP.confluence.getContentProperty('editor', console.log); // OK
      AP.confluence.getContentProperty('editor').then(contentProperty => console.log(JSON.stringify(contentProperty, null, 2))); // NOT SUPPORTED
      

      Providing support for promises will improve the clarity of code and provide support for error handling.

       

       

              Unassigned Unassigned
              dmorrow@atlassian.com Dugald Morrow
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: