The direction for AUI 9

,

Hi @mdyro,

Thanks for your quick response.

The application works by first registering a web panel on the Jira Issue view.
When initialized, a child element is created using host.create and appended to it which is where we will add our application’s UI as an iframe. The contents of the iframe are loaded in from a cross-origin website. The communication between the iframe within the web panel and the add-on occurs using Atlassian’s simple-xdm library(_AP).

This is how the iframe sends a message to the addon,

_AP.require('dialog', function(dialog) {
                        dialog.create(options);
                        callback(dialog);
                    });

To create an AUI dialog, the iframe sends details such as the options used(as a JSON). Once these options are received on the addon side, an element with attribute role = “dialog” is queried from the DOM, the child iframe element within this element is initialized with our application’s url (following the simple-xdm guide)

Below is the code to initializes the iframe using the ‘src’ attribute,

var $dialogEl = AJS.$('#' + options.key).clone(); //section HTML element with role dialog
            var $contentIframe = $dialogEl.find('.content-iframe'); //iframe within the above element is fetched
var iframeParams = host.create(extension, function(){
                console.log("Initialized iframe");
            });
var host = window.host.min['default'];
            var extension = {
                addon_key: options.addon_key,
                key: options.key,
                url: $contentIframe.attr('data-src'),
                options: {
                    autoresize: true
                }
            };
            var iframeParams = host.create(extension, function(){
                console.log("Initialized iframe");
            });
            $contentIframe.attr('id', iframeParams.id);
            $contentIframe.attr('name', iframeParams.name);
            $contentIframe.attr('src', iframeParams.src); //url returned from the host.create after passing extensions
            _dialog = AJS.dialog2($dialogEl);
            _dialog.show();

The error occurs when _dialog.show() is called, This can be seen in the aui.chunk file refer image,

image (1).png