]> khamidou — GitHub mirrors - electron.git/commit
improve advice on callbacks passed from renderer to main
authorTim Ruffles <timruffles@googlemail.com>
Thu, 27 Aug 2015 16:10:02 +0000 (17:10 +0100)
committerTim Ruffles <timruffles@googlemail.com>
Thu, 27 Aug 2015 16:10:02 +0000 (17:10 +0100)
commit4bc9bf76541ce6ab7e817cc27a3b75883d2cd4d3
treed29bea6c22cadb4e09c5ce1d52ea1bf1893734b5
parent195be931a4f28e1acfb4fa7da5c6fb3a9c9855e7
improve advice on callbacks passed from renderer to main

Remote is a great feature, it's a shame to put people off unnecessarily. I think the original warnings given are too extreme

The potential bugs that stem from not cleaning up event handlers (or any reference) are present in any Javascript code. We don't avoid using event-handlers in the DOM because we might forget to clean them up!

I've added an example of the behaviour of return values from synchronously called callbacks from renderer, and have changed the advice from 'you shouldn't do this' to 'be careful when you do this'.
docs/api/remote.md