AU Responses
An AU response is the command sent from the server to the client for synchronizing back the server's states and performing some functionality. In response to the AU request sent by the client, the server could send one or multiple AU responses to the client. Each AU response consists of a command and a sequence of data. The command is a string, and the data could be any objects (as long as JSON can handle it).
There are two groups of commands depending on whether the command is applied to a particular widget (Widget), or to the whole browser. For sake of description, we call the first kind of commands as the widget commands, while the second kind the global commands.
Class | Object | Description |
---|---|---|
AuCmd0 | zAu.cmd0 | AuCmd0 is the class to handle all global commands (i.e., applied to the whole browser).
Furthermore, all global commands are handled by an instance of AuCmd0 called zAu.cmd0. |
AuCmd1 | zAu.cmd1 | AuCmd1 is the class to handle all widget commands (i.e., applied to a particular widget).
Furthermore, all global commands are handled by an instance of AuCmd1 called zAu.cmd1. |
Add a New Command
If you'd like to add a new command, you could simply add a new property to to zAu.cmd0 or zAu.cmd1, depending on your requirement. For example,
zk.zAu.cmd0.bookmark = function (bk, replace) {
//...
};
Version History
Version | Date | Content |
---|---|---|