Hi all,

i have a scriptable gecko-plugin with the following interface
definition:

#include "nsISupports.idl"
[scriptable, uuid(9fa508c4-ab62-405d-8a09-de0fd8906b02)]
interface nsIMyPlugin : nsISupports {
  void func(in long val);
};

This interface is accessible with java-script like this:

    var myplugin = document.getElementById("myId");
    myplugin.func(25);

When I try the same in my gecko embedding app I always get an error. I
do the following:

   nsCOMPtr<nsIDOMElement> elem;
   document->GetElementById(NS_LITERAL_STRING("myId"), getter_AddRefs
(elem));
   nsCOMPtr<nsIMyPlugin> myplugin = do_QueryInterface(elem, &rv);

In the last line I can't  query the interface. The return value rv is
0x80004002 (NS_NOINTERFACE). But the interface is there, since it is
callable from java-script. I'm doing something wrong here, but what?
Can anyone help me with this?

Thanks,
Rainer
_______________________________________________
dev-embedding mailing list
dev-embedding@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-embedding

Reply via email to