Skip to content

nwutils/nw-electron-adapter

Repository files navigation

nw-electron-adapter

Node.js CI Test Coverage: 100% Lint Coverage: 100% Compatible with Node 8.3+ Code of Conduct: No Ideologies MIT Licensed

An adapter for Electron's API inside NW.js

Goal

// Be able to replace
const app = require('electron').app;

// with
const app = require('nw-electron-adapter')(window);
// and have most of the API work the same in NW.js.

Usage

  1. npm install --save nw-electron-adapter
  2. Replace const app = require('electron').app; or const {app} = require('electron'); with const app = require('nw-electron-adapter')(window);
  3. Reference the below API Parity Tracker and make issues/PR's for missing features you need.

API Parity Tracker

Statuses:

  • πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
  • πŸŒ—πŸŒ‘πŸŒ‘πŸŒ‘ Proposed (PR or detailed issue)
  • πŸŒ•πŸŒ‘πŸŒ‘πŸŒ‘ Planned
  • πŸŒ•πŸŒ—πŸŒ‘πŸŒ‘ Started
  • πŸŒ•πŸŒ•πŸŒ‘πŸŒ‘ Working
  • πŸŒ•πŸŒ•πŸŒ•πŸŒ‘ Documented
  • πŸŒ•πŸŒ•πŸŒ•πŸŒ— Tested
  • πŸŒ•πŸŒ•πŸŒ•πŸŒ• Released
API Rating Status
quit πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
exit πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
relaunch πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
isReady πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
whenReady πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
focus πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
hide πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
show πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setAppLogsPath πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getAppPath πŸŒ•πŸŒ•πŸŒ•πŸŒ• Released v1.0.0
getPath πŸŒ•πŸŒ•πŸŒ•πŸŒ• Released v1.0.0
getFileIcon πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setPath πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getVersion πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getName πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setName πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getLocale πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getLocaleCountryCode πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
addRecentDocument πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
clearRecentDocuments πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setAsDefaultProtocolClient πŸŒ•πŸŒ‘πŸŒ‘πŸŒ‘ Planned externaly
removeAsDefaultProtocolClient πŸŒ•πŸŒ‘πŸŒ‘πŸŒ‘ Planned externaly
isDefaultProtocolClient πŸŒ•πŸŒ‘πŸŒ‘πŸŒ‘ Planned externaly
getApplicationNameForProtocol πŸŒ•πŸŒ‘πŸŒ‘πŸŒ‘ Planned externaly
setUserTasks πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getJumpListSettings πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setJumpList πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
requestSingleInstanceLock πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
hasSingleInstanceLock πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
releaseSingleInstanceLock πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setUserActivity πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getCurrentActivityType πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
invalidateCurrentActivity πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
resignCurrentActivity πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
updateCurrentActivity πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setAppUserModelId πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setActivationPolicy πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
importCertificate πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
disableHardwareAcceleration πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
disableDomainBlockingFor3DAPIs πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getAppMetrics πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getGPUFeatureStatus πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getGPUInfo πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setBadgeCount πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getBadgeCount πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
isUnityRunning πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
getLoginItemSettings πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setLoginItemSettings πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
isAccessibilitySupportEnabled πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setAccessibilitySupportEnabled πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
showAboutPanel πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setAboutPanelOptions πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
isEmojiPanelSupported πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
showEmojiPanel πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
startAccessingSecurityScopedResource πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
enableSandbox πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
isInApplicationsFolder πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
moveToApplicationsFolder πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
isSecureKeyboardEntryEnabled πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
setSecureKeyboardEntryEnabled πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
accessibilitySupportEnabled πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
applicationMenu πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
badgeCount πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
commandLine πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
dock πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
isPackaged πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
name πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
userAgentFallback πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
allowRendererProcessReuse πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned

Events

Event Rating Status
will-finish-launching πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
ready πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
window-all-closed πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
before-quit πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
will-quit πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
quit πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
open-file πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
open-url πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
activate πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
continue-activity πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
will-continue-activity πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
continue-activity-error πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
activity-was-continued πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
update-activity-state πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
new-window-for-tab πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
browser-window-blur πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
browser-window-focus πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
browser-window-created πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
web-contents-created πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
certificate-error πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
select-client-certificate πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
login πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
gpu-info-update πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
gpu-process-crashed πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
renderer-process-crashed πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
accessibility-support-changed πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
session-created πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
second-instance πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
desktop-capturer-get-sources πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
remote-require πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
remote-get-global πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
remote-get-builtin πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
remote-get-current-window πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned
remote-get-current-web-contents πŸŒ‘πŸŒ‘πŸŒ‘πŸŒ‘ Not Planned

Alternatives