adopted-ember-addons / adopted-ember-addons/ember-electron

Consider returning `window` from `openTestWindow`

Aberta
#1,150 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
802
Forks
106
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Not that I'd want to encourage anyone to use [`@electron/remote`](https://github.com/electron/remote), but I still have code that uses it so need to do stuff like: `require('@electron/remote/main').enable(someWindow.webContents);`

In the case of an `ember-electron` app's tests, this means I can't use the default [`openTestWindow`](https://github.com/adopted-ember-addons/ember-electron/blob/main/lib/test-support/index.js#L32) function in [`lib/test-support/index.js`](https://github.com/adopted-ember-addons/ember-electron/blob/main/lib/test-support/index.js) because it doesn't return a reference to the [`BrowserWindow`](https://www.electronjs.org/docs/latest/api/browser-window) it creates. It's not really a big deal in that it's not hard to work around, but if you'd be open to a PR that changes this I'd be willing to make one. (And it'd let me reduce some duplication on my side.)

See also:

* https://stackoverflow.com/questions/69233435/uncaught-error-electron-remote-is-disabled-for-this-webcontents
* https://stackoverflow.com/questions/69059668/enableremotemodule-is-missing-from-electron-v14-typescript-type-definitions
* https://github.com/electron/remote#migrating-from-remote

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.