How electron creates global properties

clipboard.png

index.js



:
clipboard.png

but this makes it impossible for node to call

directly.

if export is used in node, the rendering process will not work.

how to maintain the current usage in the rendering process, and how to use global properties in the main process

or some other good global method property can be used

Feb.23,2022

add global attributes via DefinePlugin in webpack. Note! If the added attribute is an object, and a value in the object is a path, you need to JSON.stringify it, otherwise an error will be reported.

clipboard.png

clipboard.png

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1c29c2f-339aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1c29c2f-339aa.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?