octalmage / robotjs

Node.js Desktop Automation.
http://robotjs.io
MIT License
12.38k stars 961 forks source link

support context-aware? #660

Closed zhangshaoju1987 closed 3 years ago

zhangshaoju1987 commented 3 years ago

Expected Behavior

support context-aware

Current Behavior

(node:1032) Electron: Loading non-context-aware native module in renderer: '\?\C:\Users\Administrator\Desktop\1\joe_meeting-pc\node_modules\robotjs\build\Release\robotjs.node'. This is deprecated, see https://github.com/electron/electron/issues/18397.

Possible Solution

Steps to Reproduce (for bugs)

  1. use robotjs in electorn render process
  2. window.robotjs = require("robotjs"); // use this in preload.js

Context

Your Environment

{ node: '14.16.0', v8: '8.9.255.24-electron.0', uv: '1.40.0', zlib: '1.2.11', brotli: '1.0.9', ares: '1.16.1', modules: '87', nghttp2: '1.41.0', napi: '7', llhttp: '2.1.3', openssl: '1.1.1', icu: '68.1', unicode: '13.0', electron: '12.0.4', chrome: '89.0.4389.114' os:'windows10' }