- How do I pass an argument to the handler of Event.observe?
- Event.observe(document, "dom:loaded", foo_function);
- Event.observe(document, "dom:loaded", foo_function, {arg1: bar_argument, arg2: baz_argument})
- Event.observe(document, "dom:loaded", (function(e, bar_argument, baz_argument) {
- //now bar_argument = bar,and baz_argument = baz
- }).bindAsEventListener(this, bar, baz));