Closed humphd closed 9 years ago
cc @brianfeister
Thanks so much for notifying me! I'll be lurking. Still haven't rolled my sleeves up and attempted integrating this project in it's current state into our (Angular) web app. I'm sure there will be lots of lessons learned there.
This is happening in https://github.com/humphd/brackets/pull/349
@humphd You've done a great job on this. Are we ready to close?
Yeah, this is done.
Thimble embeds Bramble in an iframe and then communicates with it using
postMessage
. This design is a common one, and it will always be necessary in order to isolate Bramble from an actual web app, since Bramble allows (and encourages!) arbitrary script execution.We already have requests to use Bramble in other web apps, and it would be nice if we generalized how we're doing it such that any third-party could use the editor easily. I'd like to see us do something like the YouTube IFrame API, where you basically include a script, and specify an element to hold the editor, and then communicate with it using function calls, which get turned into
postMessage
calls in/out of the iframe. See https://developers.google.com/youtube/iframe_api_referenceWe already know that there are some common things one might want to do with Bramble from the hosting app:
We should be careful not to let this get out of hand (it's fun designing APIs), and just start by making it possible to do what we need in Thimble via this API. As we understand the problem, we can add more.