4

Generally for a javascript application, compatibility is mentioned in terms of browser types and browser versions it supports.

Frameworks/Libraries like ExtJs also mention about the browser versions they are compatible with.

Does this mean that if my javascript application can run on Google Chrome 10+ version, then any operating system where Google Chrome 10+ can be installed will be able to run my javascript application without any glitches?

Or does type of operating system also have an effect on Javascript execution?

The reason behind asking this is to evaluate the scope of testing of javascript applications before making any commitment to the end user.

Thanks in advance for any guidance provided.

Vivek
  • 141
  • 3

3 Answers3

3

In theory, yes, everything should work fine. In reality, no. The differences should be relatively minor, but they do exist.

As an example, a few years ago I found that some code of mine worked on Safari for windows but not for Mac.

Guidance? Test everything and then test again! Don't trust emulators either. Test on the actual hardware.

Rocklan
  • 4,314
  • 1
  • 15
  • 29
  • 3
    In theory there is no difference between theory and practice. In practice, there is. :-) – Carson63000 May 28 '13 at 23:58
  • @LachlanB: Thanks for the post. As mentioned by you - "The differences should be relatively minor", so if they are minor then also would you advise to - "Test everything and then test again! Don't trust emulators either. Test on the actual hardware"? – Vivek May 29 '13 at 12:12
  • Note I said _should_. Always test. – Rocklan May 29 '13 at 14:32
0

The general environment where JavaScript code is executed is JavaScript engine of your browser.

Nowadays (unlike the first years of JavaScript, where things were not as standardized as it is today) has a standard established by the Ecma International, so the developers are trying to follow this standard. In theory, all browsers covering specific version of the specification should behave in the same way!

But things are not so great when you use external libraries. You probably noticed that in most cases, these libraries have a dependency! They are often depend from the implementation of different technologies such as CSS3, HTML5, etc.

For example, you want to achieve fadeIn effect with jQuery. How it works? For a short period of time, opacity property for specific element is changed - dependency of CSS3's opacity property.

It's the same with some of HTML5 features, they still do not work well enough in all browsers, but here again no problems come from the JavaScript engine, and from the way different HTML5 APIs are implemented in browsers.

0

Since the browsers come with their own JavaScript engine, on first sight it should be sufficient to test browsers only. But some functions have to communicate with the underlying operating system (File API comes to mind), so there is a dependency, which requires OS specific testing.

nibra
  • 688
  • 3
  • 10
  • Thanks Nibra, so if we exclude such APIs which have a dependency on OS, then can we say for the remaining things to be independent of OS & depend only upon the browser? – Vivek May 29 '13 at 12:14
  • Yes, *if* you can identify those APIs for sure. – nibra May 29 '13 at 13:04