@@ -1,5 +1,18 @@
-export default{
- data:{
- hello,
+class messagebridge{
+ constructor(){
+
+ }
+}
+class websocket{
+ webSocket;
+ url;
+ construtor(url){
+ this.url=url;
+ this.webSocket=new WebSocket(url);
+ this.webSocket.onopen=this.webSocketOnOpen;
+ webSocketOnOpen(){
+ console.log("websocket连接成功!")
}
@@ -28,8 +28,8 @@ async function createWindow() {
// Use pluginOptions.nodeIntegration, leave this alone
// See nklayman.github.io/vue-cli-plugin-electron-builder/guide/security.html#node-integration for more info
- nodeIntegration: process.env.ELECTRON_NODE_INTEGRATION,
- contextIsolation: !process.env.ELECTRON_NODE_INTEGRATION
+ nodeIntegration: true,
+ contextIsolation: false,
})