AP.dialog.create and close deprecated?


I am using AP.dialog.create and on(‘close’) event in a Connect app. If I check my console i get the following messages:

AJS’s create element functionality has been deprecated since 5.9.0.
No alternative will be provided.
Use document.createElement() or jQuery.parseHTML(), or preferably use a templating library.

I found that there is alternative to on(‘close’) event AP.events.on(‘dialog.close’… but from what I seen this does not provide same functionality. The original on(‘close’) event could pass parameters from the dialog to the parent template via data property which the new event doesn’t seem to have.

Should I be worried about this deprecation notice? Should I create the dialog differently? I can rewrite the on close event to circumvent the issue but I don’t know what exactly to do for AP.dialog.create.

Any help would be appreciated!

You can ignore the deprecation notice. This is coming from the connect part on the host application. It is the responsibility of Atlassian to deal with these type of warnings, this is outside your domain. You cannot even fix this, given that you have no control over the host application.


Hello @remie,

I understand, thank you for your reply!


Hi @remie,

You are right - it’s on us to be cleaning this up. IMO, we’re logging far too much to the developer console.