trypurescript icon indicating copy to clipboard operation
trypurescript copied to clipboard

Add foreign module and HTML editor

Open paf31 opened this issue 9 years ago • 5 comments

maybe with tabs

paf31 avatar Jan 24 '16 00:01 paf31

:+1: Can we think of a nice way of having this work in combination with Gists?

Possibly make both sources have their own gists and have the PureScript one reference the other by a comment on the first line (not necessarily shown in the editor).

-- foreign GIST_ID_HERE
module ...

LiamGoodacre avatar Mar 16 '16 20:03 LiamGoodacre

I tried creating a gist with a Main.purs and Main.js hoping that would work.

It would be great if it did, even if it's not the most ideal way to support foreign modules.

paulyoung avatar Aug 01 '17 07:08 paulyoung

The big problem here is security. We don't want unverified foreign code being eval'd on user's machines without their say so.

paf31 avatar Aug 01 '17 16:08 paf31

I figured that would be a big factor.

paulyoung avatar Aug 01 '17 16:08 paulyoung

What we could do is to have compile.purescript.org serve the entire HTML page into the iframe. Then the same origin policy would solve things for us. We could even load more packages this way.

paf31 avatar Sep 01 '17 02:09 paf31