How to register an XPCOM component during install
"Ajit Web" <[email protected]> Tue, 15 Feb 2005 12:45:22 +0530
| Newsgroups | gmane.comp.mozilla.devel.xpinstall |
|---|---|
| Message-ID | <002401c5132e$1d990c80$4d01a8c0@lwebsamhita> |
Hello everybody,
I am trying to use XPCOM object through the Javascript code in an xbl file. I want to register both the xpcom object and the xbl file for use at the client side.
I am trying to bind an HTML input element with an xbl binding. For this I have a binding code in the html file.
Partial HTML File
.MyInput
{
-moz-binding:url("chrome://SamTest/Binding.xbl#Myinput");
}
<input class=MyInput />
Partial XBL File
:
:
<bindings>
<binding>
<content>
<children/>
</content>
<implementation>
<constructor>
:
:
JavaScript code for creating a xpcom object
and calling its method.
:
</constructor>
</implementation>
</binding>
</bindings>
This type of structure works for local file. ie. if I place both files in a directory on client and try opening in the Netscape brower. But it doesn't work when I shift the application files to web ie keep on the webserver.
Looking forward for a reply.
Regards
Ajit Anvekar