Window related functions
Name
Window -- browser independent access to window related functions.
Description
Makes it possible to register multiple hooks that are executed when the window has finished loaded or has been resized.
Provides browser independent access to the window dimensions.
Details
Following is a detailed description of the elements listed in the synopsis.
Functions
|
A hook function is meant to be executed in the middle of the normal flow of a certain operation. Normally a hook function always has to return true. This means that after it has returned, the next hook in the queue will be executed. If false is returned, the execution of the next hooks is halted and has to be explicitly resumed with the nextHook function. This functionality is typically used to allow hooks to work with timeouts to themselves. This makes it possible to wait for another action to be finished before continuing.
Returns
- true
- after the hook returns, the next hook function in the queue will be executed.
- false
- after the hook returns, the execution of the next hook function will be halted until nextHook is called.
|
|
Registers the provided loadHook function so that it will be executed when the window has finished loading. The hooks will be executed in the order of the position parameter that was provided.
Parameters
- loadHook
- the hook function that will be executed after the document has finished loading.
- position
- the position that indicates the order in which the hooks will be executed. If this parameter is omitted, the hook will be added to the end of the queue.
|
|
Registers the provided resizeHook function so that it will be executed when the window has been resized. The hooks will be executed in the order of the position parameter that was provided.
Parameters
- loadHook
- the hook function that will be executed after the window has been resized.
- position
- the position that indicates the order in which the hooks will be executed. If this parameter is omitted, the hook will be added to the end of the queue.
|
|
Returns an internal width of the window.
Returns
- integer
- the internal width of the window.
|
|
Returns the internal height of the window.
Returns
- integer
- the internal height of the window.
|
|
This function has to be called by a hook function if it has explicitly stopped the execution of the next hooks by returning false. Care has to be taken that this is always called when its needed, otherwise the execution of all RelativeLayer scripts will be halted. |