- From: Tab Atkins Jr. <jackalmage@gmail.com>
- Date: Sun, 2 Nov 2014 09:49:22 -0800
- To: Robert Longson <longsonr@gmail.com>
- Cc: www-svg <www-svg@w3.org>
On Sun, Nov 2, 2014 at 4:29 AM, Robert Longson <longsonr@gmail.com> wrote: > Given that this allows an image to be completely changed I suspect we > wouldn't be willing to implement this feature to modify SVG-as-an-image i.e. > via the image tag or backgound images. Using it via the object or iframe > tags would be OK though. This gives you no ability that is not already theoretically present via :target, which lets you vary your image based on the hash in the url. (This technique is heavily used already in the SVG-as-image case to do "SVG stacks", or "sprite sheets" in a single SVG file.) This is just an expansion of that power to make it easier to use in more complex cases. (Interestingly, though :target *looks like* it only passes a single bit of information - is the element targeted or not - you can use a ton of outermost nested <g>s with different IDs to have :target identify a point in a range, which can communicate arbitrarily large amounts of information, at the cost of an extremely nested DOM.) > If it gives you the ability to do something that a gif or png doesn't allow > then it breaks people's mental model of images. E.g. if you host a bulletin > board and you vet image uploads somehow as safe then you should not be able > to get around that by removing some part of the image to reveal a completely > different image. It's dependent on the URL used to link to it. If you're vetting images manually, you'll see the same image that your users do, since you'll be using the provided URL in both cases. Again, this is identical to the use of :target today, just easier to use when you want to communicate more than a few bits of information. ~TJ
Received on Sunday, 2 November 2014 17:50:09 UTC