This HTML is based upon a previous solution found here:
<body>
<object data="C:\Dts\AipDirs\Eg\MarsOutputStore\_AD2_LFBD_000.svg" id="alphasvg" width="100%" height="100%" type="image/svg+xml"></object>
<script>
var a = document.getElementById("alphasvg");
alert (a); // Displays [object HTMLObjectElement] when page is loaded into IE on desktop, but [object] when loaded into System.Windows.Forms.WebBrowser
// it's important to add an load event listener to the object, as it will load the svg doc asynchronously
a.addEventListener("load",function(){
alert ("in addEvenetListener for load");
},false);
</script>
and this works as I'd expect when I load it into IE (version 10) running on my desktop. However, when I load it into a WebBrowser object in a UserControl it doesn't work - the alert returns a different object (see comment on that line) and it then complains that:
Object doesn't support property or method 'addEventListener'
Why does WebBrowser not behave like IE on the desktop?