logoalt Hacker News

rendawtoday at 3:21 AM1 replyview on HN

This isn't obvious to me. You can have javascript external to the svg for making it interactive, it doesn't have to be embedded in the svg. And the interactivity for json canvas isn't embedded in the canvas json either.


Replies

itishappytoday at 1:11 PM

If we're adding external interactivity, we're treating each as a custom DSL format and need to evaluate them as such:

JSON Canvas:

    graph primitive
    easier to read, write, and reason about
    harder to render
SVG:

    path primitive
    easier to render
    harder to read, write, and reason about