I created a library in a firefox extension :
./components/main.js
./skin/icon.png
./install.rdf
./chrome.manifest
my main.js would use define a class calling a mozilla TCPScoket ( https://developer.mozilla.org/en-US/docs/Web/API/TCPSocket)
function MYLib() {}
MYLib.prototype.doWork = function(arg1,arg2) { /* do something with TCPScoket */}
How should I use my library on the client side in the HTML ?
I'm looking for something like (?):
<html><head><script>
var mylib = MozillaApiThing.createNewInstance("chrome://myextension/", "MYLib");
....
</script>(...)