simple js event-like function stacks