javascript engine before nitro (in Mobile Safari) - javascript

Lots of articles deal with the "new" js engine nitro on iOS.
For developing and comfortable testing for older iOS devices, I would like to install an outdated browser on windows or ubuntu which is using the same js interpreter?
It's so sad that the js interpreter or js engine differs so much, even with parsing scripts.
To find the right WebKit port, I have to know the name of the "old" js engine. Where to find it?
Thanks

In the case of the pastebin example, there is a syntax error because class is a reserved word and can not be written (with strict js settings like on the old ios webkit).
Use .className instead!

To test with different JavaScript engines and browsers I would recommend using the genius Browserstack. It offers emulators for iOS 3.2 to 6.0 for either the iPhone or iPad. With a comprehensive unit testing suite for your app it should be easy to find engine specific errors.

Related

Is angularjs work client side?

I have a page built-with angular functionality,
It is works fine from xampp server (http://localhost/...) but It didn't work from my desktop.
Please let me know AngularJS work from client-side like HTML / Java Script.
Yes, AngularJS (v1 and v2) is a JavaScript framework which only works on the client side.
https://angularjs.org/
For the Server side, you can take a look at Node.JS which works perfectly with AngularJS.
https://nodejs.org/en/
Yes, it works on client side. However, you need to install webserver, to run the app. Take a look at node.
Yes, Angular JS works on client side but you can't call REST API Services without Server.
AngularJS fits the definition of a framework the best, even though
it's much more lightweight than a typical framework and that's why
many confuse it with a library.
AngularJS is 100% JavaScript, 100% client-side and compatible with
both desktop and mobile browsers. So it's definitely not a plugin or
some other native browser extension.
About the client side browser support
We run our extensive test suite against the following browsers: the
latest versions of Chrome, Firefox, Safari, and Safari for iOs, as
well as Internet Explorer versions 9-11. See Internet Explorer
Compatibility for more details on supporting legacy IE browsers.
If a browser is untested, it doesn't mean it won't work; for example,
older Android (2.3.x) is supported in the sense that we avoid the dot
notation for reserved words as property names, but we don't actively
test changes against it. You can also expect browsers to work that
share a large part of their codebase with a browser we test, such as
Opera > version 12 (uses the Blink engine), or the various Firefox
derivatives.

Changing the JavaScript engine in side a web browser

It is possible to change the JavaScript engine being used inside a Web Browser?
Some additional information:
For testing mobile applications, I would like to be able to emulate the exact JavaScript engine being used by a web browser to find bugs.
If there anyway to change the javascript engine being used in a Browser such as Chrome or would I need to build my own browser?
This is an interesting feature. I'd like to test Safari Javascriptcore engine in Chrome browser instead of V8. Because I noticed that some of my angular code is not rendered correcty on JavascriptCore engine and rendered correctly on other browsers. It'll be in handy when you found some bugs on ios devices and you have no mac device nearby.
UPD
I found browsers where you can change browser engine lunascape and avant. these browsers are triple engine browsers and you can switch between engines.
There are a number of open source browsers. It is theoretically possible to replace the JavaScript engines they use and compile your own executable. Indeed a number of browsers have changed engines during their history.
You'll probably need to make changes to the API to make them compatible though.
There's no way to do this from JavaScript, of course.
Generally, a given browser ships with a single JavaScript engine. There is no need to ship with multiple engines, because if additional features are required of the engine, they'll simply be added to the engine which the browser ships with.
I could potentially see the existence of a modular web browser which requires plugging in a JS engine separate from the main program (which could then result in the user having multiple JS engines on their machine), but I know of no such browser, and thus know of no means by which JS could be used to swap the engine.
I suppose you could implement EMCAScript in JavaScript, but that seems like a tremendous hassle.
In response to the edits to your question: I believe Chrome Dev Tools' mobile emulation will get you what you want instead of what you've asked for.

How to implement JavaScriptCore debugger?

JavaScriptCore contains debugger package which is written in c++.
This is the link of debugger package.
Can we use this debugger for debugging java script from eclipse or xocde,
Any reference or sample implementation will be helpful.
Thanks
The WebKit folks have recently moved the JavaScriptCore-specific portion of the WebKit Web Inspector (aka Safari's Web Inspector) into JavaScriptCore itself with the intent to allow remote debugging JSContext objects in iOS apps the same way you can debug UIWebView objects now. This feature is supposed to ship with iOS 8.
JavaScript debugging in the Web Inspector is actually built on top of JSC::Debugger so you can either adapt it or use it as a reference implementation. The code lives here, but it seems that it won't work as-is without iOS 8 or OS X 10.10. Still, it seems like a good starting place if you want to build your own debugger interface.

Embedding native code in webapps on multiple platforms/browsers

I'm thinking of embedding native code (primarily for numerical computations) in a web application. Currently I'm aware of the following technologies for accessing native code from javascript:
ActiveX Objects in Internet Explorer on MS Windows
Native Client in Chrome/Chromium (Windows, OSX, Linux)
XPCOM for Firefox (I suppose also for all supported platforms)
Now I have two questions:
The list is clearly missing Safari/OSX and mobile browsers (iOS and Android). Are there any similar solutions for these?
Are there any efforts/projects to bring these thechnologies together or at least make the development of a cross-platform solution a bit less complicated as it will be anyway? (i.e. let you define your core interfaces/classes and help you generate wrappers for the different approaches)

How to use Seed in Windows, Mac, Android to write standalone applications in JavaScript?

Use Javascript language with Seed looks great. But how do you use it in Windows, Mac, Android?
Is there any port available for those?
I was trying to test them in cross-platforms where in my Gnome it works only, such as: http://git.gnome.org/browse/seed-examples/tree/
#!/usr/bin/env seed
Gtk = imports.gi.Gtk;
Gtk.init(Seed.argv);
var window = new Gtk.Window({title: "Example"});
window.signal.hide.connect(Gtk.main_quit);
window.show_all();
Gtk.main();
It might not be the answer you are looking for, but the seed wiki states that seed is for the "GNOME platform", it's not coming with a cross platform GTK all-in-one package.
If you want to do lightweight and interpreter-centric cross platform development with javascript, you may want to look at Mozilla's rhino (probably coupled with swt, I found that pretty easy - did a couple of scripts that work on osx/win/linux if the machine has java and js.jar), or node.js (if no gui is required, I never had luck with node graphical bindings in a cross platform fashion) - node-webkit from Intel's opensource department also looks interesting.
If Android is a must and you care to give up interpreters, you may try as3 (the flex sdk is "free" and now we have captive runtime air apps) or neko/haxe, they are ecmascript dialects, but of course there are quite a lot of possibilities; these are the ones I looked at earlier. Hope it helps and sorry if it did not.
Szabolcs Kurdi is right but there is a solution to get javascript to work with gui in Windows.
its called app.js and is a highly developed nodejs module. (Windows, Mac, Linux)
appjs.org
check it out if you like. i personaly use it and love it.
you even can use webkits javascript debugger IN it by calling window.frame.openDevTools();
and you can forward module methods into the dom of it.
besides using appjs you could use .hta files in windows in order to create forms using javascript.
i would not recommend this though since microsoft jscript is very limited in debuggability, performance and support.
you also need to keep in mind that gnome uses javascript in its core in multiple ways so it has api's to native methods that you will not find in microsoft's jscript.
in order to get something similar i would srsly recommend you nodejs since you can extend it with thousands of modules (while appjs is one of them).

Categories

Resources