The DOM Content popup allows you to add an element DOM in a popup window. This allows you to add a JS element to a popup.
var domElement = document.createElement('div');
domElement.innerHTML = "Hello world";
var popup = JSAPI.get().getPopupAPI().buildDOM(domElement);
popup.show();