kaylee
This part of the documentation covers all the client-side interfaces of Kaylee.
A typical Kaylee project implements two callbacks in the pj
namespce:
The events below are the basic Kaylee client-side logic events and should not be triggered by the user's project code in order to avoid unpredictable behaviour. Nevertheless, feel free to bind to these events to the code outside of the project and track how Kaylee works internally.
For example, the following code will echo all log messages to the browser console:
kl.message_logged.bind(console.log)
In the following example the total amount of tasks is kept in a counter:
tasks_count = 0 kl.task_received.bind( (task) -> tasks_count += 1 )
The AJAX
module provides convenient way to make GET/POST
requests to the server. It also provides routines to load javascript and stylesheet files on-fly. The functions are accessible by both auto(worker-based) and manual(DOM-based) projects.