That example has the logic being performed from an event callback. How can I perform logic when a control is created? For example, I want to insert some html div into the DOM, then instantiate some jquery plugin on the inserted div. I have tried this and the compiler complained. I'm sure I'm doing it wrong but the documentation doesn't help. For example
screen root() {
header("Title")
$("#div").someplugin();
}
Can't do that. I tried to get around this by creating a control, but from what I can tell controls return html, not objects.