Yeah - very smart.
I suppose the lines won't be interactive (e.g. "double click on this line to add a text label") because the line isn't there in any sense Javascript would be aware of. Unless Javascript computes the same gradient, which is then a pointless duplication. But it's very clever.
Makes me wonder if there's a missing format out there that should be built into browsers that describes shapes and connections.