mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
how to use node module #169
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @leovictor on GitHub (May 30, 2018).
Originally assigned to: @GregorBiswanger on GitHub.
I'm trying to use a node module (iohook) but appears the message: Cannot find module 'iohook'. Is it possible to use node module with electron.net?
@GregorBiswanger commented on GitHub (Sep 26, 2018):
Hello @leovictor
how would you like to use your feature request?
Best,
Gregor
@sachin-devitpl commented on GitHub (Feb 20, 2020):
Hello Gregor,
What is the solution for this ? If I want to use iohook package to be added in my electronize build, then what should I do ?
Thanks in advance..
@GregorBiswanger commented on GitHub (Feb 20, 2020):
Hi @sachin-devitpl
the HostHook API allows you to execute your own JavaScript/TypeScript code on the host process.
Create first an ElectronHostHook directory via the Electron.NET CLI, with the following command:
electronize add hosthook.In this directory you can install any NPM packages and embed your own JavaScript/TypeScript code. It is also possible to respond to events from the host process.
You find the sample source code in ours Demo-App (ElectronNET.WebApp)
Controllers\HostHookController.csand in theElectronHostHookfolder.Cheers,
Gregor