JavaScript ECMAScript定义 [英] JavaScript ECMAScript definitions

查看:62
本文介绍了JavaScript ECMAScript定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


或多或少只是出于好奇......


我有一个简短的''讨论''关于JavaScript在不同的borwsers。

其他人说,浏览器中的JavaScript存在差异(我认为,b b b假设他的版本与版本不同),因为有不同的

函数"。

我不同意,因为我认为这是因为不同的DOM'。我知道

,例如IE 5.0(或5.5?)不支持array.push()(和

多),但这不仅仅是草率实现或只是使用

不同版本的语言?


说一个版本的JavaScript应该是相同的是否安全

除了DOM差异之外到处都有吗?


是否带有浏览器特定元素的JavaScript ECMA-262?


提前致谢,


Manno

解决方案




manno写道:

我在不同的borwsers中进行了关于JavaScript的简短''讨论'。
其他人说,浏览器中的JavaScript存在差异(我认为他的意思是除了版本之外),因为有不同的
功能。
我不同意,因为我认为这是因为不同的DOM'。我知道
例如IE 5.0(或5.5?)不支持array.push()(以及更多),但这不仅仅是草率实现或只是使用
不同版本的语言?


好​​吧,array.push根本不是DOM的一部分,它是核心方法

对象数组。

JavaScript ECMA-262是否具有特定于浏览器的元素?




这取决于您询问的对象,也许还取决于您询问或

问某人。

随着它在Netscape 2.02浏览器中的推出,该语言只有一个

的实现,这是在浏览器环境中但是

根本没有ECMAScript标准。后来Netscape也在服务器上使用了它的

JavaScript引擎,并记录了客户端

JavaScript和服务器端JavaScript版本。其中包含ECMAScript中指定的核心

对象和主机环境特定对象

像窗口,客户端JavaScript文档和服务器特定

对象在服务器端JavaScript。

现在Netscape分别是Mozilla有两个开源JavaScript

引擎,一个名为Spidermonkey,用C实现,另一个叫做

Rhino用Java编写,有很多不同的应用程序可以使用这些引擎。因此,您可以在许多

环境中使用JavaScript脚本,而不仅仅是浏览器特定的。

MS JScript脚本引擎也可以嵌入很多

不同的环境,在IE浏览器中,但也在ASP页面中,如在Windows脚本主机中。

-

Martin Honnen
http://JavaScript.FAQTs.com/


Martin Honnen写道:

好吧,array.push根本不是DOM的一部分,它是一个核心对象Array的方法。


我知道数组对象的函数不属于任何DOM的一部分,我正在尝试

来讨论我认为的那个人的论点用。但是要去讨论他的论点,是不是草率的实现还是IE 5版本使用的另一个

版本的JavaScript?

所以你可以在许多环境中都有JavaScript脚本,而不仅仅是特定于浏览器的。




这或多或少都是我问的原因,Flash(以及新的Director MX 2004) )

支持ECMAScript兼容的JavaScript语法,我想知道是否实际上也可以说是浏览器:Firefox支持

ECMAScript兼容的JavaScript语法"。


所有人都有不同的''DOM''。


谢谢

Manno




manno写道:

Martin Honnen写道:

好吧,array.push根本不是DOM的一部分,它是
核心对象Array的一种方法。



我知道数组对象'它的功能不是任何DOM的一部分,我试图在我所争论的那个人的论点中继续。但是,为了反对他的论点,它是草率的实现还是IE 5版本使用的另一个版本的JavaScript?




MS调用它JavaScript / ECMAScript JScript的实现。我认为

IE5附带JScript 5,当时ECMAScript版本3

已经出来我不记得了,我认为Windows 98已经

以IE5为特色,而ECMAScript第3版标准最终出现在1999年
因此MS实施该标准可能并不邋

而是专注于其他东西等待ECMAScript版

3最终确定。

-


Martin Honnen
http://JavaScript.FAQTs.com/


Hi all,

more or less just out of curiosity...

I had a short ''discussion'' about JavaScript in different borwsers. The
other guy said that there''s differeces in JavaScript accross browsers (I
assumed he meant apart from versions) "because there''s different
functions".
I didn''t agree because I think that''s because of different DOM''s. I know
that for example IE 5.0 (or 5.5?) does not support array.push() (and a
lot more), but isn''t that just sloppy implementation or simply using
different versions of the language?

Is it safe to say that one version of JavaScript should be the same
everywhere except for DOM differences?

Is JavaScript ECMA-262 with browserspecific elements?

Thanks in advance,

Manno

解决方案



manno wrote:

I had a short ''discussion'' about JavaScript in different borwsers. The
other guy said that there''s differeces in JavaScript accross browsers (I
assumed he meant apart from versions) "because there''s different
functions".
I didn''t agree because I think that''s because of different DOM''s. I know
that for example IE 5.0 (or 5.5?) does not support array.push() (and a
lot more), but isn''t that just sloppy implementation or simply using
different versions of the language?
Well, array.push is not part of the DOM at all, its a method of the core
object Array.

Is JavaScript ECMA-262 with browserspecific elements?



It depends on whom you ask and perhaps it also depends when you ask or
asked someone.
With its introduction in the Netscape 2.02 browser there was only one
implementation of the language and that was in a browser environment but
there was no ECMAScript standard at all. Later Netscape used its
JavaScript engine also on the server and documented both client-side
JavaScript and server-side JavaScript "versions" which consisted of core
objects specified in ECMAScript and host environment specific objects
like window, document in client-side JavaScript and server specific
objects in server-side JavaScript.
By now Netscape respectively Mozilla has two open-source JavaScript
engines, one called Spidermonkey implemented in C, the other called
Rhino imlemented in Java, and there are many different applications that
use those engines. So you can have JavaScript scripting in many
environments, not only browser specific ones.
And the MS JScript scripting engine can also be embedded in many
different environments, in the IE browser but as well in ASP pages as in
Windows Script host.

--

Martin Honnen
http://JavaScript.FAQTs.com/


Martin Honnen wrote:

Well, array.push is not part of the DOM at all, its a method of the core
object Array.
I know the array object''s functions are no part of any DOM, I was trying
to go along in the arguments of the guy I argued with. But to go
_against_ his argument, is it sloppy implementation or just another
version of JavaScript that IE 5 version uses?
So you can have JavaScript scripting in many
environments, not only browser specific ones.



That was more or less why I asked, Flash (and the new Director MX 2004)
support "ECMAScript-compliant JavaScript syntax", I was wondering if
this actually could be said of browsers too: "Firefox supports
ECMAScript-compliant JavaScript syntax".

All with a different ''DOM'' ofcourse.

Thanks
Manno




manno wrote:

Martin Honnen wrote:

Well, array.push is not part of the DOM at all, its a method of the
core object Array.


I know the array object''s functions are no part of any DOM, I was trying
to go along in the arguments of the guy I argued with. But to go
_against_ his argument, is it sloppy implementation or just another
version of JavaScript that IE 5 version uses?



MS calls its implementation of JavaScript/ECMAScript JScript. I think
IE5 came with JScript 5 and whether at that time ECMAScript edition 3
was already out I don''t remember exactly, I think Windows 98 already
featured IE5 while the ECMAScript edition 3 standard came out at the end
of 1999 thus MS was probably not sloppy in implementing that standard
but rather focussing on other things and waiting for ECMAScript edition
3 to be finalized.
--

Martin Honnen
http://JavaScript.FAQTs.com/


这篇关于JavaScript ECMAScript定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆