Personal tools

Browser Event Handling

From OpenLaszlo

API Specification

  • Lz.attachEventHandler(Object:eventscope, String:eventname, Object:callbackscope, String:methodname)
  • Lz.removeEventHandler(Object:eventscope, String:eventname)

Problem Justification

  • Why is this API change the best way to fix it?

Currently, the DHTML runtime may listen for browser DOM events by listening directly, e.g. window.onload. This prevents others from being able to listen to the event.

  • Please give an example that shows why this API change is a good idea?

This proposes an API that will be used internally by the various runtimes to register events. In doing so, we allow others to listen for those events alo.

  • Does adding this API effectively deprecate another usage pattern?

Not that I can think of.


ptw sez: I'm P T Withington, and I approve this proposal.