MacGapProject / MacGap1

Desktop WebKit wrapper for HTML/CSS/JS applications.
Other
3.55k stars 208 forks source link

Trigger JavaScript events on any object #62

Closed mutru closed 11 years ago

mutru commented 11 years ago

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.