* Forward events
(name)
| 723 | */ |
| 724 | |
| 725 | function forward(name) { |
| 726 | return function(_event) { |
| 727 | // NOTE: the raw Electron event used to be forwarded here, but we now send |
| 728 | // an empty event in its place -- the raw event is not JSON serializable. |
| 729 | if (!closed) { |
| 730 | parent.emit.apply(parent, [name, {}].concat(sliced(arguments, 1))) |
| 731 | } |
| 732 | } |
| 733 | } |
| 734 | }) |