You know what's a real travesty in browser land? iframes cannot automatically resize to the height of their content. The height can only ever be hardcoded. For this reason all embed codes on the web need JavaScript.
@Cedara Not a browser dev!
@gargron This is why I've come to prefer linking over embedding.
@nino Ah so you never play a youtube video on a page that isn't youtube.com
@gamehawk I have not, but a year ago I was implementing Mastodon embeds and came across this issue which required a complicated JS solution
@Gargron I think I've run across the problem in the past too but just chalked it up to my limited front-end skills.
@gamehawk If you want to embed 10 toots from 10 different instances on one page, such as a blog article, you'll need to load the same JS from 10 domains separately.
@Gargron See, this is exactly why I stick with the server side of things. It's too scary out there.
@Gargron I'll go on record here to say fuck whatwg for dropping the iframe[seamless] attribute, which existed to do exactly that
That plus [srcdoc] would have made things so much easier
@flussence Oh damn, we had a chance of solving it and someone blew it? That's even worse
@Gargron Their excuse was along the lines of “it's too hard for browsers to implement, it'll slow layout down”. Yeah, so does n-gate's privacy page but I don't see browsers backpedalling on that
Torture the implementers on behalf of the users, imo
@Gargron some months ago I've solved it javascript-free by using viewport values.
https://web-design-weekly.com/2014/11/18/viewport-units-vw-vh-vmin-vmax/
Specifically, vw and vh. Vmin and vmax was buggy on safari.
@Gargron As a user, I don’t want iframes to resize as their content arrives. There are enough reasons why web pages jump around already.
@gargron Can you invent something cooler? :)