An HTML file that I created is being displayed in an HTML object on the parent page. I am creating some drag events on my page and they work fine when calling my html file directly. But, when displayed inside an HTML <object> , the drag events (specifically trying dragover), do not fire, even though I see them listed in my event listeners. During my troubleshooting, I noticed this is not an issue when showing the page inside an <iframe>.
I don't have the option to me to use <iframe>, is there something I can do to allow the dragover event when displayed through the object tag?
<html>
<head>
</head>
<body>
<iframe frameborder="0" width="100%" height="100%" src="mytest.html"></iframe>
<object width="100%" height="100%" data="mytest.html"></object>
</body>
</html>
document.addEventListener("dragover", function(event) {
event.preventDefault();
dragovertest();
});
function dragovertest(){
alert("popup");
}