Appending DOM element to WebViewer

For the desktop viewer you could instead have:

`
WebViewer(…).then(function(instance) {
var docViewer = instance.docViewer;
var iframeDoc = instance.iframeWindow.document;

docViewer.on(‘pageComplete’, function(pageIndex) {
var zoom = docViewer.getPageZoom(pageIndex);
var container = iframeDoc.getElementById(‘pageWidgetContainer’ + pageIndex);
var location = {
x: 100 * zoom,
y: 100 * zoom
};

var div = document.createElement(‘div’);
div.style.position = ‘absolute’;
div.style.zIndex = 100;
div.style.top = location.y + ‘px’;
div.style.left = location.x + ‘px’;
div.textContent = ‘Some Text’;

var button = document.createElement(‘button’);
button.textContent = ‘Open Popup’;
button.addEventListener(‘click’, function() {
alert(‘Opening my popup’);
});

div.appendChild(button);
container.appendChild(div);
});
});

`