viebel/klipse

Enable shared state between iframes

bhugueney opened this issue · 1 comments

Thanks again for this awesome piece of software !

In order to be able to use klipse in reveal.js presentation, one has to use iframes. However, if each silde uses a different iframe for the code snippet, no state is shared (e.g. function definitions) between the various code snippets in different slides and they all have to be self contained which severely reduces the usefulness. It should be possible for iframes to share some state through the parent, could Klipse enable a kind of session id that would enable code snippets in an iframe to lookup a shared context in parent for variables and functions already defined ?
Having multiple sessions could be generally useful, and Klipse could either look them up in current frame or parent if in an iframe. No session id would be the default unnamed context.

Best Regards

EDIT: Also, apparently, iframes are not necessary.

I don't think it is possible to share state between iframes.
If you have an idea about how we could achieve that, let me know.