Does Windows 8 Compile JavaScript?

2019-04-28 10:35发布

It is exciting that Windows 8 is supporting so many languages for Metro App development. One that especially interested me was the HTML5/CSS/JavaScript. What I don't understand, is this code going to get compiled in a sort of executable (like the C#, VB, and C++ option), or would my app basically be running in IE as an actual web page?

2条回答
你好瞎i
2楼-- · 2019-04-28 10:53

Here's a video overview of some of how to use JavaScript with the new Windows 8 Runtime from BUILD2011 (slides also available on the same page). The presenter goes through a simple project with JavaScript and the WinRT and gives a pretty nice overview of WinRT in general. You can read more about all that on this related SO thread.

查看更多
叼着烟拽天下
3楼-- · 2019-04-28 11:09

Yes. Javascript is executed on Windows 8 by the Chakra engine. Similar to the .NET just-in-time compiler, it translates javascript to optimized machine code. Also the approach taken by Google's V8 and Mozilla's TraceMonkey engines. Some background info is here.

查看更多
登录 后发表回答