Handling Custom URL Schemes in NW.js with registerProtocolHandler
Learn how to expose app‑specific URLs in NW.js using registerProtocolHandler, with a step‑by‑step example, timing tips, and security trade‑offs.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how to expose app‑specific URLs in NW.js using registerProtocolHandler, with a step‑by‑step example, timing tips, and security trade‑offs.
NW.js blends Node.js and Chromium in one renderer, making preload scripts the only security boundary. Context isolation moves preloads to an isolated world, but native addons, webview inheritance, and Electron API gaps create real migration friction.
NW.js lets DOM JavaScript call Node directly — but whether those worlds share one context is the decision that determines your app's security posture. Here's how to structure around it.
Node-Remote Whitelist Behavior in Production Builds When an NW.js app is run in development mode, any loaded page—including those from remote URLs—has automatic access to Node.js APIs. However, after packaging the application, the default sandbox prevents Node.js integration for remote content unless the page’s origin is explicitly listed in the node-remote
A packaged NW.js application relies on the bundled Chromium accessibility tree to expose DOM roles, labels and states to native assistive technologies. The user-facing workflow needs predictable screen reader compatibility across platforms, but there is no documented NW.js configuration that explicitly controls or tests that mapping. Accessibility support is
Production Path Discrepancies During local development, the NW.js nw command resolves resource paths relative to the current working directory. However, in a packaged application, the working directory shifts to the application root. This change often causes relative paths that function correctly in development to fail in production unless they are explicitl