JS的“味道”? [英] 'Flavors' of JS?

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

问题描述

人们对这句话有什么看法:JS在这么多浏览器中存在很多

风味(并且跨越html / xhtml / xml分区)

在网站上包含任何内容都变得不受欢迎。


Jim

What do people feel about this statement: "JS exists in so many
flavours across so many browsers (and across the html/xhtml/xml divides)
that it is becoming undesirable to include any on a site."

Jim

推荐答案

Jim Witte写道:
Jim Witte wrote:
人们对这句话的看法是什么:JS存在于如此众多的浏览器中(以及跨越html / xhtml / xml
划分的那么多味道)在网站上包含任何内容都变得不受欢迎。
What do people feel about this statement: "JS exists in so many
flavours across so many browsers (and across the html/xhtml/xml
divides) that it is becoming undesirable to include any on a site."




它表明了对浏览器脚本的理解与昨天的

命题一样多''制定方案 JS''的版本。


Javascript在如此多的风格中不存在,所有当前的浏览器

实现基于ECMA 262的javascript,至少完全实施

第二版,大部分实施第三版。对该语言有正式的

规范提供了一个明确的标准,可以判断

的实现,并且可以确定不符合要求的实现

并纠正,以便他们确实符合。结果是

实现的多样性越来越少,并且已经为任何实际的b $ b目的提供了足够一致/可靠的语言核心。


浏览器DOM从未如此一致,因此当前状态

与之前的任何内容都没有区别,但浏览器现在已经是

围绕W3C DOM标准汇聚,提供了更多的b $ b b一致的功能核心。


已经证明(通常)它是可以创建浏览器

脚本,这些脚本在面对他们可能在互联网上遇到的所有环境排列时表现出计划行为,

并在遇到任何足够支持的环境时提供有价值的增强功能。

创建这样的脚本可能不是一件微不足道的设计任务,但是没有理由不使用它一次创建




因此,只要任何事情都成为,任务就变得越来越容易。

使用javascript的可取性与可以编写脚本的

环境的多样性无关。它只能与脚本实现环境的适用性相关。


在浏览器脚本中,故障是不可避免的(如用户总是可以禁用脚本)因此必须设计一个合适的脚本,以便它在失败时不会削弱(甚至损害)网页。 ,但是一旦

设计在完全失败的情况下是有道理的,那么当浏览器不支持时,总会有一条清洁掠夺路径。

b $ b支持脚本所需的特定功能。


Richard。



It demonstrates as much understanding of browser scripting as your
proposition yesterday of ''making a "Scheme" version of JS''.

Javascript does not exist in "so many flavours", all current browsers
implement javascript based on ECMA 262, at least fully implementing the
2nd edition, with the majority implementing the 3rd. Having a formal
specification for the language provides a clear standard against which
implementations can be judged, and non-conforming implementations can be
identified and corrected so that they do conform. The result is that
there is ever less diversity in implementations, and already a
sufficiently consistent/reliable language core for any practical
purpose.

Browser DOMs have never been consistent so the current state of affairs
does not differ from anything that has gone before, but browsers are now
converging around the W3C DOM standards, providing an ever more
consistent core of functionality.

It has been demonstrated (often) that it is possible to create browser
scripts that exhibit planed behaviour in the face of all of the
permutations of environments that they may encounter on the Internet,
and provide a valuable enhancement when they encounters any environment
that is sufficiently supportive. It may not be a trivial design task to
create such a script but there is no reason for not using it once
created.

So, insofar as anything is "becoming", the task is becoming easier. The
desirability of the use of javascript is not related to the diversity of
environments that can be scripted. It can only be related to the
suitability of the implementation of the script for its environment(s).

In a browser script failure is inevitable (as it is always possible for
the user to disable scripting) so a suitable script must be designed so
it will not cripple (or even harm) a web page when it fails, but once
the design makes sense in the face of total failure there is always a
path of clean depredation to be followed when the browser does not
support the specific features required by the script.

Richard.


Richard Cornford写道:
Richard Cornford wrote:
Jim Witte写道:
Jim Witte wrote:
人们对这句话的看法是什么:JS在这么多浏览器中存在很多
风格(并且跨越html / xhtml) / xml
分歧)在网站上包含任何内容都变得不受欢迎。

它演示尽可能多地了解浏览器脚本,就像你昨天提出的制作方案一样。 JS''的版本。

Javascript不存在于如此多的风格中,所有当前的浏览器都基于ECMA 262实现javascript,至少完全实现了
2nd版本,大部分实施第3版。有一个正式的
What do people feel about this statement: "JS exists in so many
flavours across so many browsers (and across the html/xhtml/xml
divides) that it is becoming undesirable to include any on a site."

It demonstrates as much understanding of browser scripting as your
proposition yesterday of ''making a "Scheme" version of JS''.

Javascript does not exist in "so many flavours", all current browsers
implement javascript based on ECMA 262, at least fully implementing the
2nd edition, with the majority implementing the 3rd. Having a formal



........在浏览器脚本中,故障是不可避免的(因为用户总是可以禁用脚本)这样一个合适的脚本必须设计得如此,它不会在网页失败时削弱(甚至伤害)网页,但一旦设计在完全失败的情况下有意义,总会有一条路径当浏览器不支持脚本所需的特定功能时,应遵循干净的掠夺。

理查德。


........ In a browser script failure is inevitable (as it is always possible for
the user to disable scripting) so a suitable script must be designed so
it will not cripple (or even harm) a web page when it fails, but once
the design makes sense in the face of total failure there is always a
path of clean depredation to be followed when the browser does not
support the specific features required by the script.

Richard.




我看到以下有关我有数据的网站的统计数据。

有8个浏览器有一些用法。

我们使用javascript,但很少。甚至很难对所有这些浏览器进行
测试。


46.79%MSIE 6.0

33.45%Mozilla / 5.0

3.00%MSIE 5.5

2.22%MSIE 5.0

1.95%Googlebot / 2.1(+ http://www.googlebot.com/bot.html

1.88%Konqueror / 3.2

1.55%libwww-perl / 5.63

1.41%Python-urllib / 2.0a1

0.81%Mozilla / 3.01(兼容;)

0.72%Konqueror / 3.1

0.72%Yahoo! Slurp

0.60%Opera / 7.2

0.50%Python-urllib / 1.15

4.40%其他/未知


-

Robin Becker



I see the following statistics for the web site that I have data for.
There are 8 browsers with some usage.
We use javascript, but sparingly. It is pretty hard to even
test against all these browsers.

46.79% MSIE 6.0
33.45% Mozilla/5.0
3.00% MSIE 5.5
2.22% MSIE 5.0
1.95% Googlebot/2.1 (+http://www.googlebot.com/bot.html)
1.88% Konqueror/3.2
1.55% libwww-perl/5.63
1.41% Python-urllib/2.0a1
0.81% Mozilla/3.01 (compatible;)
0.72% Konqueror/3.1
0.72% Yahoo! Slurp
0.60% Opera/7.2
0.50% Python-urllib/1.15
4.40% Other/unknown

--
Robin Becker


Robin Becker写道:

< snip>
Robin Becker wrote:
<snip>
我看到以下有关我的网站数据的统计数据。有8个浏览器有一些用法。


这是相关的因为?

我们使用javascript,但很少。甚至很难对所有这些浏览器进行测试。
I see the following statistics for the web site that I have
data for. There are 8 browsers with some usage.
And this is relevant because?
We use javascript, but sparingly. It is pretty hard to even
test against all these browsers.



< snip>


总是无法测试对所有浏览器来说,只有很多,而且总有一些你从未听说过。这并不意味着它不能为所有浏览器创作。


但是发现用8个浏览器测试很难听起来不像你好吗/ b $ b非常努力。我当前所在的计算机上安装了24个

安装的Web浏览器,它当前是从它启动的分区上运行的,而另外两个可启动的分区是多少30多个,并且只是我用于浏览器测试的计算机中的一个。


Richard。


<snip>

It always was impossible to test against all browsers, there are just to
many, and always some you have never heard of. That doesn''t mean it is
impossible to author for all browsers.

But finding it difficult to test with 8 browsers doesn''t sound like you
are trying very hard. The computer I as currently sitting at has 24
installed web browsers on the partition it is currently booted from, and
two more bootable partitions with 30-odd more, and that is only one of
the computers I use for browser testing.

Richard.


这篇关于JS的“味道”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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