You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Go playground currently supports displaying images if your output consists of the string "IMAGE:" followed by a base64-encoded PNG (or, presumably because browsers are permissive, GIF).
It would be nice to support SVG images too. The patch is very small: in fact, I created a change (in the wrong place!), but @dmitshur suggested a discussion here would be appropriate. The necessary diff can be seen here.
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
proposal: x/website (small): support SVG images in playground output
proposal: x/playground: support SVG images in output
Apr 25, 2023
I would also appreciate guidance on where exactly to make the change(s). I see three places in the golang org that seem to include the IMAGE-rendering code.
One further note. I believe scripting is disabled in SVG images embedded using the <image> tag. MDN states it explicitly for Gecko, and in my tests, Chrome does the same thing, although I'm not familiar enough with the blink sources to validate it in code (despite trying for a while!).
The Go playground currently supports displaying images if your output consists of the string "IMAGE:" followed by a base64-encoded PNG (or, presumably because browsers are permissive, GIF).
It would be nice to support SVG images too. The patch is very small: in fact, I created a change (in the wrong place!), but @dmitshur suggested a discussion here would be appropriate. The necessary diff can be seen here.
The text was updated successfully, but these errors were encountered: