Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error at <webview> using "save image" #98

Open
amwtxgt opened this issue Feb 24, 2020 · 3 comments
Open

Error at <webview> using "save image" #98

amwtxgt opened this issue Feb 24, 2020 · 3 comments

Comments

@amwtxgt
Copy link

amwtxgt commented Feb 24, 2020

contextMenu({ window:document.getElementById('webview'), showCopyImage:true, showSaveImageAs:true, showCopyImageAddress:true, })

Uncaught (in promise) TypeError: Cannot read property 'session' of undefined at index.js:138 at new Promise (<anonymous>) at module.exports../node_modules/electron-dl/index.js.module.exports.download (index.js:135) at click (index.js:109) at CallbacksRegistry.apply (callbacks-registry.ts:45) at remote.js:292 at EventEmitter.<anonymous> (remote.js:272) at EventEmitter.emit (events.js:210) at Object.onMessage (init.ts:50)

Electron verson 8.0.0

@sindresorhus
Copy link
Owner

Help welcome. I don't use <webview> :)

@Nantris
Copy link

Nantris commented May 7, 2020

The Electron team also recommends against using <webview />. Not super helpful for resolution I know, but in case anyone comes across this and was unaware of that fact.

@jaques-tino
Copy link

You can try my solution:

contextMenu({
    window: { webContents },
    showSaveImageAs: true
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants