Adobe 38040334 - Dreamweaver CS3 User Manual page 121

Api reference
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

Description
This function registers a JavaScript function to be called on a periodic basis during idle processing time.
Arguments
,
,
id
idleFunction
interval
- a unique string used to identify the idle task to register. To ensure uniqueness, prefix the ID with a unique
id
identifier. For example you might want a beep every 5 seconds, but you wouldn't want to call the task
because someone else might also have created a task of the same name. A better name would be something like
, thus providing both context and uniqueness.
"acme_beep_task"
- the JavaScript function to be called during idle processing time.
idleFunction
- the number of seconds between calls of
interval
Returns
A Boolean value indicating whether the idle task was successfully registered.
Example
The following example causes the system to beep once every 5 seconds:
dw.registerIdleHandler("acme_beep_task", function() { dw.beep();}, 5);
dw.revokeIdleHandler()
Availability
Dreamweaver CS3.
Description
This function removes an idle task previously spawned by the
to provide a way to remove a previously registered idle task. If an idle task is expected to remain active until the appli-
cation is terminated, it is unnecessary to call this function. In this case, the idle task is removed automatically before
termination.
Arguments
id
- a unique string used to identify the registered idle task to remove. This is the same ID that was initially used
id
to register the task.
Returns
A Boolean value indicating whether the idle task was successfully removed.
Example
The following example removes the idle task known as
dw.revokeIdleHandler("acme_beep_task");
, subject to idle-time availability.
idleFunction
registerIdleHandler()
from the idle task queue:
"dw_beep_task"
DREAMWEAVER CS3
API Reference
,
"beep"
function. The intention is
116

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents