The browser engine has rich support for features such as canvas, WebSocket, session storage, offline apps, worker threads, Document Object Model (DOM) improvements, audio and video tags, and WebGL.
Included with your SDK is a reference browser application implemented with HTML5, CSS3, and JavaScript. The browser includes tool bars, status bars, URL address entry, buttons, and so on. A browser without these components is called a "chromeless browser". If required, you can customize or replace this browser application. Because the browser application is implemented in HTML5, the code is readily viewable via Web Inspector in WebKit browsers, such as Google Chrome.
Downloading and browsing content from the web can be a fairly daunting task for a browser, given the wide variety of content and encoding types used on the Internet. The browser engine handles these different content types transparently by creating and managing the objects necessary to render the incoming content. The engine provides view classes used to display content. Each view class (called a WebView) contains frames (called WebFrames); each frame implements its own scroll bar. You don't need to implement custom views or custom frames in order to display content in your app.
By running multiple WebViews in a single engine instance, overall memory footprint can be reduced. However, since all apps share the same engine, they're not isolated from each other. Bad behavior in one app can impact all other apps that share the same engine instance. This mode would typically be used for a set of apps that are tested together and deployed as a bundle (e.g., core apps shipped from the manufacturer). Or, a single app can be run in its own private engine instance. This provides isolation at the expense of increased memory footprint.
The web browser app supports URL entry, tabs, back, forward, history, settings, and bookmarks. By default, the browser supports 800×480 and 720p resolutions in landscape mode. To support other resolutions, you can modify the browser application source.
The HTML5 application framework provides the necessary additions to the browser engine to allow it to support full-fledged apps. This environment allows developers to create and deploy apps built from web technologies (HTML5, CSS3, and JavaScript) with plugins that provide access to the underlying device hardware and native services, just like native C/C++ apps.
The browser engine includes plugins based on the Netscape Plugin API (NPAPI) through a dynamically linked library. The plugins provide access to PPS (Persistent Publish/Subscribe), SQL, and Screen services. You can add additional plugins as required.
The PPS plugin provides the HTML5 domain with access to the full PPS API.
The SQLite 3 plugin provides SQLite database access, including a complete API for opening, querying, and modifying the database.
JavaScript Cordova plugins use the browser engine plugins to provide HTML5 apps with access to middleware-layer services, including radio, phone, media engine, ASR, and navigation. For example, the audioplayer plugin uses the PPS plugin to provide access to functions such as start, pause, and play. The reference media player application depends on this plugin.
Included as part of WebKit, Web Inspector is a useful debugging and profiling development tool for web content. You can use this tool to troubleshoot and optimize your web content for your apps. The tool includes a variety of features and capabilities, such as inspection, profiling, console integration, and more. For details, see "Debugging Web Apps" in this guide.