//MozAxc/
EmbedInIE


Been dinking again with the Mozilla control. Some cool news ... the author has a sample of the MozAxc control being embedded inside a web page and loaded in IE [go here] -- and via Ruby I can even access this embedded Mozilla control -- sort of :-)

I can do something like:

ie.document.all.MozCtl.navigate 'www.google.com'

... and the embedded mozilla control will navigate to Google. Very cool.

But as soon as I want to access the document property to start working with its DOM, I get tripped up. The following:

ie.document.all.MozCtl.document

... evaluates back to ie.document ... which makes sense when you think about it. ie.document.all.MozCtl inside Internet Explorer's DOM is an Object instance (Object being a tag just like Form or Button). Apparently, when calling .navigate on this instance, IE realizes the Object instance doesn't have its own .navigate method and passes it through to the ActiveX control itself. But when calling .document, IE realizes the Object instance does have its own .document method (a reference back to ie.document) and returns that, with nothing getting passed on to the ActiveX control.

The WebBrowser docs say there's a GetProperty method which could be a way to work around this, force the .document call through ... but I can't get GetProperty to work.

I've contacted the MozAxc author, but he's out of pocket until Jan 6th.

-- chrismo


| Email | Reload ? || Find | Recent | Home last update: Sun May 29 2005 08:01 AM