💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] ## 方法 ``` protocol.registerStandardSchemes(schemes) protocol.registerServiceWorkerSchemes(schemes) protocol.registerFileProtocol(scheme, handler[, completion]) protocol.registerStringProtocol(scheme, handler[, completion]) protocol.registerHttpProtocol(scheme, handler[, completion]) protocol.unregisterProtocol(scheme[, completion]) protocol.interceptFileProtocol(scheme, handler[, completion]) protocol.interceptStringProtocol(scheme, handler[, completion]) protocol.interceptBufferProtocol(scheme, handler[, completion]) protocol.interceptHttpProtocol(scheme, handler[, completion]) protocol.uninterceptProtocol(scheme[, completion]) ``` ## 例子 ``` const {app} = require('electron'); const path =require('path'); if (!app) return; if (process.defaultApp) { if (process.argv.length >= 2) { app.setAsDefaultProtocolClient('electron-demo', process.execPath, [path.resolve(process.argv[1])]) } } else { app.setAsDefaultProtocolClient('electron-demo') } ```