最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

What are the differences between Firefox and Chrome in Javascript? - Stack Overflow

programmeradmin0浏览0评论

There seem to be a number of differences (beyond performance of course) between both browsers when using Javascript. I am not even sure those are bugs or indeed different evaluations. In my applications (large, plex IDEs) I noticed here and there that Chrome is doing things different:

  • Array::indexOf and sorting appears different (hard to isolate for me)
  • scripts dealing with blur and focus seem to be different
  • a number of other minor issues with CSS
  • some other issues I can't remember of right now. The point of this post is to figure out what's different, nothing else :-)

I am also not really sure that the Chrome differences are really my faults and so I was wondering there things to know about Chrome vs FF when it es to Javascript. My test-units do run all fine except in Chrome...

I did search a lot but I couldn't find any remendation, guide or simple cheat list; possibly some folks here know better :-)

(ff/chrome version doesn't seem to matter)

thanks!

There seem to be a number of differences (beyond performance of course) between both browsers when using Javascript. I am not even sure those are bugs or indeed different evaluations. In my applications (large, plex IDEs) I noticed here and there that Chrome is doing things different:

  • Array::indexOf and sorting appears different (hard to isolate for me)
  • scripts dealing with blur and focus seem to be different
  • a number of other minor issues with CSS
  • some other issues I can't remember of right now. The point of this post is to figure out what's different, nothing else :-)

I am also not really sure that the Chrome differences are really my faults and so I was wondering there things to know about Chrome vs FF when it es to Javascript. My test-units do run all fine except in Chrome...

I did search a lot but I couldn't find any remendation, guide or simple cheat list; possibly some folks here know better :-)

(ff/chrome version doesn't seem to matter)

thanks!

Share Improve this question edited Aug 6, 2015 at 20:20 xamiro asked Aug 6, 2015 at 20:01 xamiroxamiro 1,4011 gold badge18 silver badges32 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

This is a very large question as each are built on different frameworks and therefore support functions differently, especially once you start going back a few versions.

But here is a simple page that lets you dig into the differences of each.

http://caniuse./#pare=firefox+42,chrome+47 (change versions to whichever you want)

This is a small portion and you can already see there are too many differences for anyone here to list.

In addition to canIuse, there's also kangax's patibility tables. However your question appears to be geared more towards an under-the-hood implementation parison, I can't help you there. Anything not in the spec (or marked as implementation-defined) is fair game: for instance object property order is not guaranteed but both seem to maintain insertion order when iterating via for...in.

发布评论

评论列表(0)

  1. 暂无评论