Yes you can.
First off, download the extension you want. For this example I'll be using this debugging tool, which adds an additional tab in the dev tools window.
- Inside your NW.js
package.json
file, ensure you have an entry called chromium-args
.
- Ensure its value contains
--enable-extensions --load-extension=relative_path_to_extension_manifest.
My package.json
looks like this:
After restarting the application, the extension shows up as expected:
Something I'll add is that the full Chrome API might not be available to you. I couldn't find info about what NW.js supports, but Electron definitely does not support the entire API, so this might have similar restrictions.
I also noticed you mention in the comments that you need to assign a hotkey of sorts. I'd need to know what you were trying to do, but essentially you have the option of either using a browser mechanism such as addEventListener('keydown', myHandler)
or using the NW.js API depending on your exact needs.