eletron怎么在preload中覆盖原有属性 #getDisplayMedia #window.close #contextBridge

178 阅读1分钟

直接使用 contextBridge.exposeInMainWorld("close", "aaa") 会出现下面的报错信息

Cannot bind an API on top of an existing property on the window object

image.png

正确使用方法直接使用 image.png