JavaScript Guides

Home

The Wormhole JavaScript Library

This overview of the MoSync Wormhole JavaScript Library gives you access from an HTML5 application to native user interface components as well as cameras, compasses, files storage, push notifications, sensors, and a whole lot more.

In physics, a wormhole is a shortcut through spacetime. In the MoSync universe, a wormhole connects JavaScript and C/C++.  The Wormhole Library consists of two parts, at one end is the JavaScript API, and at the other end is a C/C++ API.

The Wormhole JavaScript Library (wormhole.js) contains support for the following device features (PG = PhoneGap compatible; W3C = W3C compliant):

  • Sensor Manager (W3C)
  • Native UI
  • Push Notifications
  • Notification (PG)
  • Accelerometer (PG)
  • Compass (PG)
  • Device (PG)
  • Connection (PG)
  • Capture (PG)
  • File (PG, W3C)
  • Geolocation (PG, W3C)
  • Storage (PG, W3C)

With the Wormhole C++ Library you can easily add your own C/C++ code and invoke it from JavaScript, using the same JavaScript to C/C++ bridge as the Wormhole library uses. The bridge is fully available to every MoSync application and lets to both invoke C/C++ code and call back into JavaScript again.

MoSync supports the standard smartphone implementations of HTML5. That means it is possible to create rich web applications using JavaScript and CSS over the powerful MoSync core. You can even mix HTML5 UI components and Native UI widgets.

You can edit HTML and JavaScript files directly in the MoSync IDE with syntax support. There are easy-to-use project templates to get you started. The MoSync IDE helps you to develop and test your code on the emulators for Android, iOS and Windows Phone. And the IDE lets you quickly create a ready-to-install package for your app, that can be published on the App Stores.

If you are a C++ developer, you can benefit from creating cool looking user interfaces in HTML and CSS. And you don't need to master all the dirty details of CCS, as you can choose from a rich selection of high-level JavaScript libraries available on the Internet, like jQuery, jQuery Mobile, Zepto.js, and Secha Touch.

Further Reading

Our guide called Creating HTML5/JavaScript Apps. provides a comprehensive overview of the API References, guides and tutorials, example applications, and screencasts available online. To get your first app up and running quickly, go to the HTML5 getting started tutorial.

MoSync SDK 3.3
Copyright © 2013 MoSync AB
www.mosync.com