listenEvents

Summary

The method to override to attach event listeners.

Usage

public abstract void listenEvents()

Description

Override this method to provide isolated code for attaching event listeners. This isolated method enables clean separation of test code. In your test code, event listeners should not be attached; thus, this method should not be called during testing even if it is overridden.

Examples

Basic Usage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import Altitude.Frontend;
 
external $;
 
class CustomersController : Controller
{
    public override void listenEvents() {
        $("#customers").click(function() {
            // ...
        });
    }
}
 
CustomersController controller = new CustomersController();
controller.listenEvents();

Share

HTML | BBCode | Direct Link