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

cannot read appendTo from object after passing file by ipc.send message with electron #970

Closed
rafaelleru opened this issue Nov 2, 2016 · 2 comments

Comments

@rafaelleru
Copy link

@rafaelleru rafaelleru commented Nov 2, 2016

I try to pass a file by ipc message to play in a DOM with electron, but in the ipc.on method file.appendTo give me an error:

mainWindowUpdater.js:45 Uncaught TypeError: file.appendTo is not a .

I try everithing in my mind but I can make it to work.

Any help?¿

@rafaelleru rafaelleru changed the title passing file by ipc in electron appendTo not working cannot read appendTo from object after passing file by ipc.send message with electron Nov 2, 2016
@rafaelleru rafaelleru closed this Nov 3, 2016
@feross

This comment has been minimized.

Copy link
Member

@feross feross commented Jan 17, 2017

Looks like you already resolved this, but I'll just mention for future google searchers that you can't use Electron's IPC to send across object instances (with methods). The IPC methods serialize the object with the equivalent of JSON.stringify() before sending across.

@lock

This comment has been minimized.

Copy link

@lock lock bot commented May 4, 2018

This thread has been automatically locked because it has not had recent activity. To discuss futher, please open a new issue.

@lock lock bot locked as resolved and limited conversation to collaborators May 4, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.