Supported meta tags
Meta tags are used to control some aspects of BlackBerry Browser behavior. These tags are defined within a <meta> element of an HTML page using the following syntax.
<meta name="<meta_tag>" content="<directive>" >
The name attribute of the <meta> element is used to define the meta tag, and the content attribute specifies the directive that is used to define the browser behavior associated with the meta tag.
The BlackBerry Browser supports the following meta tags:
HandheldFriendly
The HandheldFriendly meta tag specifies that the content is designed for small-screen devices.
With the adoption of WebKit and the more functionally robust viewport meta tag, the HandheldFriendly tag is largely obsolete. The BlackBerry Browser with WebKit supports this value primarily for backwards compatibility. However, for BlackBerry smartphones running BlackBerry 6 or later, or for BlackBerry tablets, you should use the viewport meta tag instead. The viewport meta tag provides you greater control over the appearance and behavior of the web page.
viewport
The viewport meta tag defines a set of properties that specify the behavior and initial appearance of the web page when it is displayed in the browser window.
The directive specified by this meta tag is a list of one or more properties, specified within a comma-separated list. All properties are optional; for any properties that are not defined, the BlackBerry Browser infers a value based on the default browser behavior. For example:
<meta name="viewport" content="width=320; initial-scale=1.0; user-scalable=no;">
The BlackBerry Browser supports the following viewport properties.
cursor-event-mode
The cursor-event-mode meta tag is used to define how the browser handles cursor events on devices with trackpads. This meta tag is supported as of BlackBerry 7.
This meta tag has the following associated directives:
|
Directive |
Description |
|---|---|
|
native |
Indicates that cursor events should behave as they do in a desktop browser. Specifying this directive allows a web page to access events such as multiple or sustained trackpad clicks. A value of native disables the following UI features: |
|
processed |
Indicates that the browser will use the default event handling, that is, that no UI features are disabled. |
touch-event-mode
The touch-event-mode meta tag is used to define how the browser handles touch events on devices with a touch screen. This meta tag is supported as of BlackBerry 7.
This meta tag has the following associated directives:
|
Directive |
Description |
|---|---|
|
native |
Indicates that all touch events should be passed directly to the web page, without being processed by the browser UI. This directive disables the UI features that would normally consume touch events. Because touch events are passed directly to the web page without UI intervention, event lag is considerably reduced, allowing you to create content that requires fast, repetitive or complex multi-touch input. A value of native disables the following UI features: |
|
pure-with-mouse-conversion |
Indicates that some touch events should be passed directly to the web page, while others will be converted into a corresponding mouse event. This directive allows you to blend handling pure touch events with standard web content behavior, as mouse event conversion allows users to interact with standard form controls and links as they would on a desktop browser, and allows user to scroll a page. In addition, with this directive, users can still perform double taps and pinches to zoom in to the content. If necessary, you can pre-empt the conversion to mouse events where necessary by calling the preventDefault() method. This method will disable event conversion and pass the raw touch event directly to the web page. |
|
processed |
Indicates that the browser will use the default event handling, that is, that no UI features are disabled. |