我不小心访问了Mozilla manual site,我发现这种语言并不熟悉。 AFAIK,这不是Javascript。它看起来像Java,C#,Go或其中的一种,但我无法弄清楚语言究竟是什么。
从页面中的 API概述部分:
interface TCPSocket{
readonly attribute DOMString host;
readonly attribute unsigned short port;
readonly attribute boolean ssl;
readonly attribute unsigned long bufferedAmount;
readonly attribute DOMString binaryType;
readonly attribute DOMString readyState;
TCPSocket open(DOMString host, unsigned short port, [object options]);
TCPServerSocket listen(unsigned short port, [object options, [unsigned short backlog]])
void upgradeToSecure();
void suspend();
void resume();
void close();
boolean send(in jsval data);
attribute onopen;
attribute ondrain;
attribute ondata;
attribute onerror;
attribute onclose;
};
答案 0 :(得分:2)
看起来像对象管理组的接口定义语言。可以在http://www.omg.org/gettingstarted/omg_idl.htm,full specs of the upcoming version找到该语言的简介。