tc39 / proposal-built-in-modules

BSD 2-Clause "Simplified" License
892 stars 25 forks source link

May we please have a more sensible SVG to Canvas path? #27

Closed StoneCypher closed 5 years ago

StoneCypher commented 5 years ago

It's possible today with significant hoop jumping, but it breaks every nine months or so when a detail about security stuff or cors or tainting or whatever changes. The maintenance burden is untenable and unnecessary.

A desirable fix would be a simple [Object SVG].toCanvas({ width, ... }). If you're worried about security (I haven't figured out any security problems yet but who knows,) then require a DOM attribute called screenshottable or whatever to be set on it. Opt-in all the things.

ljharb commented 5 years ago

Both canvas and svg are part of the web platform, and not part of the language. This seems like it might be better as a web proposal instead of a language proposal?

StoneCypher commented 5 years ago

fair point

i don't know where those go, though