[Mono-osx] [MonoMac] Adding WebKit DOM interfaces
alexander.shulgin at yessoftware.com
Thu Nov 18 09:24:39 EST 2010
On 16.11.2010 23:46, Miguel de Icaza wrote:
> Yeah, because it'll be compiled into a class rather than an
> interface, so DomNode couldn't inherit from that. So after more
> thought, I've come up with this patch which adds IDomEventTarget
> What I did was to add the events directly to the DomNode, so it is
> possible to add the event listeners directly into the DomNode:
> myNode.AddEventListener (...)
> The problem with introducing C# interfaces into the mix is that it would
> be half a solution, they are not universally supported for
> incoming/outgoing arguments nor marshalling.
> The second problem is that if you feed an IFoo to a class that expects
> and NSObject, there is no way other than checking at invocation time
> that you have an NSObject, and we do not really have any way of
> enforcing that the [Exports] are on the proper methods.
OK, please disregard that patch. I've found a workaround for my task
which doesn't require it.
And my debugging remark was wrong: MonoDevelop debugger shows correct
dynamic type for NSObject in Event.Target just as well.
More information about the Mono-osx