Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What js 'engine' does cordova use?

What JS 'engine' does Cordova use? Is it platform specific or is it one standard across all platforms? Meaning safari for iOS and chrome for Android, and possible IE standards for windows? Or a 'Cordova JS' engine across all platforms.

More specifically i read that it depends on the browser JS implementation for what sorting algorithm .sort() uses (Mozilla uses merge-sort). And i was considering using a merge-sort function i created or the standard .sort() function. (which could be a merge-sort anyway). The built in .sort() seems to be about 10ms quicker, or about 14% quicker.

Only reason I would want to use my merge-sort (slower) is because I know for sure it will be implemented exactly the same across iOS, windows, android, etc...

like image 908
slowsword Avatar asked Feb 26 '16 22:02

slowsword


People also ask

Does Cordova use JavaScript?

Cordova is an open source framework that lets you convert HTML, JavaScript, and Cascading Style Sheets (CSS) into a native application that can run on iOS, Android, and other mobile platforms.

What browser does Cordova use?

Actually it is Chrome, but a different version from the Chrome App.

What language is Cordova?

Apache Cordova is a framework for building mobile apps with HTML, CSS, and JavaScript. You can target multiple platforms with one code base. Apache Cordova is an open-source mobile development framework.

How apache Cordova works?

Cordova is an open-source mobile development framework. It allows you to use standard web technologies such as HTML5, CSS3, and JavaScript for cross-platform development, avoiding each mobile platforms' native development language.


2 Answers

On Android it uses Android WebView which is based on Chromium, and uses the V8 JavaScript engine.

On iOS, as of iOS8 it uses the WKWebView which is based on Safari and uses the Nitro JavaScript engine.

On other platforms... well, whatever the native web view is.

like image 98
CodingWithSpike Avatar answered Oct 16 '22 21:10

CodingWithSpike


Cordova is, at the end of the day, a native app with a web view embedded inside, and it uses the web browser component specific to the platform where the app is deployed.

If you wish to use another Web browser component is still possible. Take a look at Crosswalk.

like image 44
Matías Fidemraizer Avatar answered Oct 16 '22 20:10

Matías Fidemraizer