Re: javascript and server socket
- From: Thomas 'PointedEars' Lahn <PointedEars@xxxxxx>
- Date: Thu, 02 Feb 2006 16:01:59 +0100
giangiammy wrote:
I'd like to implement a server socket in java:
Java or JavaScript? Because they have only the first four letters in
common. <URL:http://jibbering.com/faq/>
something linke the following example.
The problem is that the HTML has not the permission to execute
instruction
HTML does not execute anything. It is a _markup_ language.
serverSocket =
Components.classes["@mozilla.org/network/server-socket;1"].
createInstance(Components.interfaces.nsIServerSocket);
This is script code, executed by the JavaScript engine.
Question:
1 - how do I give it this permisison?
The script can request permission, and it can (not: must) be given by the
user:
<URL:http://developer.mozilla.org/en/docs/Bypassing_Security_Restrictions_and_Signing_Code>
2 - one solution I thought was to put the javascript code in a firefox^^^^^^^^^^^
extension, to load, so it should have all needed permisison, but,
How can I call a java script function define in an extension
Again, the language is named "JavaScript" for a reason.
from an html page? - there's some particular syntax?
[...]
AFAIK, you cannot. If you could, this would allow any foreign Web site
to trigger your extensions which do not run in the sandbox like the
client-side script code of the Web site. Surely you do not want that
to happen.
[invalid markup]
Learn HTML before you learn J(ava)Script/ECMAScript.
<URL:http://validator.w3.org/>
PointedEars
.
- Follow-Ups:
- Re: javascript and server socket
- From: giangiammy
- Re: javascript and server socket
- References:
- javascript and server socket
- From: giangiammy
- javascript and server socket
- Prev by Date: Re: Switch() Statement Not Working
- Next by Date: Re: Cloning entire page to hidden frame
- Previous by thread: javascript and server socket
- Next by thread: Re: javascript and server socket
- Index(es):
Relevant Pages
|