I'm trying to add an event listener to an embed object but still not success, this is the piece of bits I'm trying now.
var obj,
url = "http://www.google.com",
container = document.getElementById("contractFrameContainer");
obj = document.createElement('embed');
obj.setAttribute("type", "application/pdf");
obj.setAttribute("id", "pdf1");
obj.style.width = '100%';
obj.height = heightBody;
obj.setAttribute("src", url);
obj.addEventListener("load", pdfLoad, false);
function pdfLoad() {
// do something...
}
container.appendChild(obj);
PD: I'm using IE 11