Emi Matchu
5b2062754d
Not using this on the item page preview yet, but we will! I like this approach over e.g. a web component specifically for the sandboxing: while I don't exactly *distrust* JS that we're loading from Neopets.com, I don't like the idea of *any* part of the site that executes arbitrary JS unsafely at runtime, even if we theoretically trust where it theoretically came from. I don't want any failure upstream to have effects on us! I copied basically all of the JS from a related project `impress-media-server` that I had spun up at one point, to investigate similar embed techniques. Easy peasy drop-in-squeezy!
8 lines
124 B
CSS
8 lines
124 B
CSS
#asset-canvas,
|
|
#fallback {
|
|
position: absolute;
|
|
left: 0;
|
|
top: 0;
|
|
width: min(100vw, 100vh);
|
|
height: min(100vw, 100vh);
|
|
}
|