Skip to content

Commit

Permalink
add context menu helper
Browse files Browse the repository at this point in the history
  • Loading branch information
gwleuverink committed Nov 24, 2024
1 parent bf1d1f5 commit cde12db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions resources/js/electron-plugin/src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ const Native = {
return callback(data.payload, event);
}
})
},
contextMenu: (template) => {
let menu = remote.Menu.buildFromTemplate(template);
menu.popup({ window: remote.getCurrentWindow() });
}
};

Expand Down

0 comments on commit cde12db

Please sign in to comment.