This version appears to be working:
var iframe = document.createElement('IFRAME');
iframe.setAttribute('id' 'protoIframe');
iframe.setAttribute('src', 'myapp://datadatadata' );
iframe.style.display = 'none';
iframe.style.width = 1+'px';
iframe.style.height = 1+'px';
document.documentElement.appendChild(iframe);
UPDATE: (months afterwards)
This is the final version I've been using for IE. I detect the browser and if IE then do:
var hst = { pad:'--eof--'}
hst.forIE = function(service, data) {
var f = document.getElementById('ecPrinterIframe')
if (f )
f.parentNode.removeChild(f);
var iframe = document.createElement('IFRAME');
iframe.setAttribute('id', 'ecPrinterIframe');
iframe.setAttribute('src', 'myproto://' + data + hst.pad );
iframe.style.display = 'none';
iframe.style.width = 1+'px';
iframe.style.height = 1+'px';
document.documentElement.appendChild(iframe);
}