27 | | To bind dynamically to an event in Python, the syntax is similar to Javascript: |
---|
28 | | {{{ |
---|
29 | | element = document.GetElementById('x') |
---|
30 | | element.AddEventListener('click', 'PythonCallback', False) |
---|
31 | | }}} |
---|
32 | | |
---|
33 | | Whenever an event is dispatched a there are 3 variables that are globally accessible to the called function: |
---|
34 | | * '''event:''' The event object. |
---|
35 | | * '''self:''' The element the event is being called on. |
---|
36 | | * '''document:''' The document this element resides in. |
---|
| 27 | For full details on Python events see the [wiki:documentation/PythonManual/AttachingToEvents Python Manual] |
---|