electron-userland / electron-spellchecker

Implement spellchecking, correctly
MIT License
237 stars 83 forks source link

Chromium Sandbox Support #124

Open chrismohr opened 5 years ago

chrismohr commented 5 years ago

Unless I'm missing something, it's not possible to use this package within sandbox enabled browser.

Challenges:

  1. I can't require it in the preload script because sandbox mode doesn't allow requiring external modules.
  2. It crashes when using electron.remote.require from the preload script because it's expecting to run in the renderer process, not the main process. (https://github.com/electron-userland/electron-spellchecker/issues/70) is about that error.
  3. Bundling it with webpack doesn't help, because it requires native node modules through debug like util, that are also blocked by sandbox.

Potential Solutions:

  1. Remove all node native dependencies, so that it can be bundled.
  2. Support running in the main process.