maccman/macgap — pull request #62 by mutru (2012-12-28 11:06:26+00:00)
Title: Trigger JavaScript events on any object

Removed duplicate triggerEvent code, and refactored it so that events can be triggered on any object. For example, the Objective-C application could trigger the "blur" event on "window".

By default, events are still triggered on "document", so this shouldn't break anything.

This was useful when I fixed some bugs related to focus/blur handling and Spaces (it's going to be a separate pull request), and you could also use it to trigger some custom events from menus etc.