Skip to content
This repository has been archived by the owner on Feb 16, 2024. It is now read-only.

Commit

Permalink
Added custom window event (#39)
Browse files Browse the repository at this point in the history
* Added custom window event

* fix: comment
  • Loading branch information
bennetty committed Jan 12, 2021
1 parent d128a6f commit e6885e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -278,6 +278,7 @@ function onReady () {
break;
case consts.eventNames.windowCmdUpdateCustomOptions:
windowOptions[json.targetID] = json.windowOptions
client.write(json.targetID, consts.eventNames.windowEventUpdatedCustomOptions, json.windowOptions)
break;
case consts.eventNames.windowCmdWebContentsExecuteJavascript:
elements[json.targetID].webContents.executeJavaScript(json.code).then(() => client.write(json.targetID, consts.eventNames.windowEventWebContentsExecutedJavaScript));
Expand Down
3 changes: 2 additions & 1 deletion src/consts.js
Expand Up @@ -116,7 +116,8 @@ module.exports = {
windowEventShow: "window.event.show",
windowEventUnmaximize: "window.event.unmaximize",
windowEventUnresponsive: "window.event.unresponsive",
windowEventWebContentsExecutedJavaScript: "window.event.web.contents.executed.javascript"
windowEventWebContentsExecutedJavaScript: "window.event.web.contents.executed.javascript",
windowEventUpdatedCustomOptions: "window.event.updated.custom.options"
},
targetIds: {
app: 'app',
Expand Down

0 comments on commit e6885e5

Please sign in to comment.