Window
Availability |
BlackBerry Device Software version 3.8 or later |
Properties
Property name |
Type |
Description |
Status |
Support level |
Availability |
---|---|---|---|---|---|
applicationCache |
Returns the ApplicationCache object that applies to the active document of that browser window. |
read only |
6.0 or later |
||
blackberry |
Returns a reference to the blackberry object. |
read only |
Not part of any standard |
3.8 or later |
|
closed |
boolean |
Returns whether the window is open or closed. This property always has a value of false. |
read only |
Not part of any standard |
3.8 or later |
document |
Returns the Document object that is contained within the window. |
read only |
Not part of any standard |
3.8 or later |
|
frameElement |
Returns the element in which the window is embedded, or null if the window is not embedded in any frame. |
read only |
Not part of any standard |
3.8 or later |
|
frames |
Returns a NamedFrameMap object that contains a collection of the frames contained by the frameset. |
read only |
Not part of any standard |
3.8 or later |
|
history |
Returns the History object that contains a collection of recently accessed URLs. |
read only |
Not part of any standard |
3.8 or later |
|
innerHeight |
int |
Returns the height of the content area, including the horizontal scroll bar, if rendered. |
read only |
Not part of any standard |
3.8 or later |
innerWidth |
int |
Returns the width of the content area, including the vertical scroll bar, if rendered. |
read only |
Not part of any standard |
3.8 or later |
length |
unsigned long |
Returns the number of frames in the parent window. |
read only |
Not part of any standard |
3.8 or later |
localStorage |
Returns a Storage object associated with the local storage area for the document's origin domain. |
readonly |
6.0 or later |
||
location |
Specifies the URL of the document displayed in the browser window. |
writable |
Not part of any standard |
3.8 or later |
|
Returns the Navigator object, which provides information about the BlackBerry Browser. |
read only |
Not part of any standard |
3.8 or later |
||
name |
String |
Specifies the name of the window. |
writable |
Not part of any standard |
3.8 or later |
opener |
Window |
Returns the Window object that created the window. |
read only |
Not part of any standard |
3.8 or later |
orientation |
int |
Returns an integer that represents the current orientation of a BlackBerry device that has an accelerometer, such as a BlackBerry Storm Series device. This property can have one of the following values:
|
read only |
Not part of any standard |
4.7 or later |
parent |
Window |
Returns the parent Window object. |
read only |
Not part of any standard |
3.8 or later |
screen |
Returns the Screen object, which provides information about the BlackBerry device screen. |
read only |
Not part of any standard |
3.8 or later |
|
self |
Window |
Returns a reference to the current window. |
read only |
Not part of any standard |
3.8 or later |
sessionStorage |
Returns a Storage object associated with the session storage area, which is available only for the current browser session. |
readonly |
6.0 or later |
||
top |
Window |
Returns a reference to the top window. |
read only |
Not part of any standard |
3.8 or later |
window |
Window |
Returns a reference to the current window. Using the window property lets you invoke methods or call properties on the current window without confusion when multiple browser windows are open. Because the BlackBerry Browser is a single document interface, a new window is opened each time a new URL is opened. |
read only |
Not part of any standard |
3.8 or later |
Event handlers
Property name |
Type |
Description |
Status |
Availability |
|
---|---|---|---|---|---|
onabort |
Specifies the function to perform when the loading of a page or image is aborted. |
writable |
4.6 or later |
||
onchange |
Specifies the function to perform when a form control loses focus after the user has modified the value. |
writable |
4.6 or later |
||
onclick |
Specifies the function to perform when the user clicks the trackball or trackwheel on a BlackBerry device. |
writable |
3.8 or later |
||
onerror |
Specifies the function to perform when an ErrorEvent occurs in the worker thread. |
writable |
6.0 or later |
||
onkeydown |
Specifies the function to perform when a key is pressed down while the pointer is over an element. |
writable |
4.6 or later |
||
onkeypress |
Specifies the function to perform when a key is pressed and released while the pointer is over an element. |
writable |
4.6 or later |
||
onkeyup |
Specifies the function to perform when a key is released while the pointer is over an element. |
writable |
4.6 or later |
||
onload |
Specifies the function to perform when the BlackBerry Browser finishes loading a new page or a complete frameset. |
writable |
4.6 or later |
||
onmessage |
Specifies the function to perform when a MessageEvent occurs in the worker thread. |
writable |
6.0 or later |
||
onmousedown |
Specifies the function to perform when the user depresses the trackwheel or trackball on a BlackBerry device. |
writable |
4.6 or later |
||
onmousemove |
Specifies the function to perform when the user moves the pointer while it is over an element. |
writable |
4.6 or later |
||
onmouseout |
Specifies the function to perform when the user moves the pointer off of an element. |
writable |
4.6 or later |
||
onmouseover |
Specifies the function to perform when the user moves the pointer over an element. |
writable |
4.6 or later |
||
onmouseup |
Specifies the function to perform when the user releases the trackwheel or trackball on a BlackBerry device. |
writable |
4.6 or later |
||
onorientationchange |
Specifies the function to perform when the user changes the orientation of a BlackBerry device that has an accelerometer, such as a BlackBerry Storm Series device. |
writable |
4.7 or later |
||
onreset |
Specifies the function to perform when the user resets a form. |
writable |
3.8 or later |
||
onselect |
Specifies the function to perform when the user selects some text in a text field. |
writable |
4.6 or later |
||
onsubmit |
Specifies the function to perform when the user submits a form. |
writable |
3.8 or later |
||
onunload |
Specifies the function to perform when the BlackBerry Browser removes a new page or a frameset. |
writable |
4.6 or later |
Methods
Method name |
Description |
Support level |
Availability |
---|---|---|---|
addEventListener() |
Adds an EventListener object to a set of event listeners for the window. |
4.6 or later |
|
Displays a standard alert dialog box with an OK button. |
Not part of any standard. |
3.8 or later |
|
atob() |
Decodes a string of text that has been encoded using base-64 encoding. |
Not part of any standard. |
6.0 or later |
Removes focus from the window. |
Not part of any standard. |
3.8 or later |
|
btoa() |
Encodes a string of text using base-64 encoding. The string can be decoded using atob(). |
Not part of any standard. |
6.0 or later |
clearInterval() |
Cancels the interval set with setInterval(). |
6.0 or later |
|
clearTimeout() |
Cancels the timeout set with setTimeout(). |
6.0 or later |
|
Closes the active window. |
Not part of any standard. |
3.8 or later |
|
Displays a standard confirmation dialog box with an OK button and a Cancel button. |
Not part of any standard. |
3.8 or later |
|
dispatchEvent() |
Dispatches an Event object created by Document.createEvent(). |
4.6 or later |
|
Displays a dialog box that allows a user to enter a string of text and search for it in the current document. |
Not part of any standard. |
4.6 or later |
|
Gives focus to the current window. |
Not part of any standard. |
3.8 or later |
|
getComputedStyle() |
Retrieves the computed style values for an element. |
4.6 or later |
|
Moves the window a specified number of pixels in relation to its current co-ordinates. |
Not part of any standard. |
3.8 or later |
|
Moves the window's left and top edge to the specified co-ordinates. |
Not part of any standard. |
3.8 or later |
|
Opens a new browser window. |
Not part of any standard. |
3.8 or later |
|
openDatabase() |
Opens the given database on the BlackBerry device. If the database doesn't already exist, then a new database with the given name is created. |
6.0 or later |
|
postMessage() |
Sends a message to the main thread of the Window object. The message contains the data to be passed between threads. |
6.0 or later |
|
Prints the current contents of the window. |
Not part of any standard. |
3.8 or later |
|
Displays a prompt dialog box that prompts users for input. |
Not part of any standard. |
3.8 or later |
|
removeEventListener() |
Removes an event listener from an EventTarget. |
4.6 or later |
|
The requestAnimationFrame() method requests that the browser paint the next frame in an animation sequence. |
Timing control for script-based animations |
|
|
Resizes the viewport relative to the current viewport size. |
Not part of any standard. |
3.8 or later |
|
Resizes the viewport to the specified width and height. |
Not part of any standard. |
3.8 or later |
|
Scrolls the content to a given set of coordinates. |
Not part of any standard. |
3.8 or later |
|
Scrolls the content by the given number of pixels. |
Not part of any standard. |
3.8 or later |
|
Scrolls the content to a given set of coordinates. |
Not part of any standard. |
3.8 or later |
|
setInterval() |
Schedules a function or some code to run repeatedly at the specified interval. |
6.0 or later |
|
setTimeout() |
Schedules a function or some code to run after a specified amount of time. |
6.0 or later |
|
Stops the current download. |
Not part of any standard. |
3.8 or later |
Last modified: 2013-10-02