ngx-smart-electron
v0.0.1
Published
目的:对electron API 进行一层封装,支持promise风格和rxjs风格,提高使用上的便利性
Downloads
14
Readme
##ngx smart electron api 目的:对electron API 进行一层封装,支持promise风格和rxjs风格,提高使用上的便利性
cookies
- 当前窗口的cookie
// rxjs版本
this.injector.get(NgxRxjsElectronCookiesService)
.setCurrentContentsCookies(cookies)
.subscribe();
// promise版本
this.injector.get(NgxElectronCookiesService)
.setCurrentContentsCookies(cookies)
.then();
// getCurrentContentsCookies
// clearCurrentContentsCookies
- 指定窗口
// rx
this.injector.get(NgxRxjsElectronCookiesService)
.setCookies(cookies).subscribe()
// promise
this.injector.get(NgxElectronCookiesService)
.setCookies(cookies).then()
loadURL
this.injector.get(NgxSmartElectronService)
.loadURL(webview,url)
.then();
ipcMessage
this.injector.get(NgxSmartElectronService)
.onIpcMessage(webview,url)
.then();
domReady
this.injector.get(NgxSmartElectronService)
.domReady(webview)
.then();
other api
- isElectronApp
- desktopCapturer
- ipcRenderer
- remote
- webFrame
- clipboard
- crashReporter
- process
- nativeImage
- screen
- shell