1

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?

6
  • Which browser, change it how - and, most important: why? Commented Feb 3, 2014 at 23:46
  • And change to what actually? Commented Feb 3, 2014 at 23:47
  • That is not possible probably Commented Feb 3, 2014 at 23:48
  • This is an unusual requirement. If you explain why you want to do this (and change the title of the question) then someone might give you some ideas. Commented Feb 3, 2014 at 23:49
  • 2
    What you are asking is not possible. I'd suggest going with a multi environment approach like GhostLab or browserstack if you don't have devices yourself Commented Feb 3, 2014 at 23:53

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

Comments

0

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.

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.