logoalt Hacker News

bmachotoday at 6:53 AM2 repliesview on HN

> Curious if Animated SVGs are also a thing.

SVG is just html5, it has full support for CSS, javascript with buttons, web workers, arbitrary fetch requests, and so on (obviously not supported by image viewers or allowed by browsers).


Replies

bawolfftoday at 10:21 AM

Browsers support all that sort of thing, as long as you use an iframe. (Technically there are sone subtle differences between that and html5, but you are right its mostly the same)

If you use an <img> tag, svgs are loaded in "restricted" mode. This disables scripting and external resources. However animation via either SMIL or CSS is still supported.

vorgoltoday at 11:00 AM

It nearly got raw socket support back in the day: https://news.ycombinator.com/item?id=35381755