Although WebWorks apps offer a wide range of functionality, that functionality is limited to the resources contained within your app. By creating a custom extension, you can extend the functionality of your app to include the features and functions provided by core native APIs that are available to those apps.
Custom extensions need to be created in C/C++, which is the native language for the BlackBerry WebWorks 10 OS. After creating your extension in C/C++, you then wrap it in JavaScript. When you build and package your WebWorks app, you include the extension in the build so that your app can access the extension through JavaScript. You can pass parameters into the extended function and handle return values as you would in any native app.
You can create custom JavaScript APIs to access your own native service by adding a WebWorks extension. By creating custom extensions, you can extend the functionality of your app to include the features and functions provided by core native APIs.