Re: [csswg-drafts] [css-backgrounds][css-images][cssom] Accessing the DOM of images

On 25 June 2017 at 23:20, Henrik Andersson <henke@henke37.cjb.net> wrote:
> One thing I've realized is that css allows for the use of SVG images.
> And those have a DOM of their own.

I'm not an implementer, but I assume that currently SVGs integrated into a page via CSS don't have a DOM.

> It'd be interesting if it was possible to access the DOM of the image in javascript. The user agent
> already needs to have it anyway.

Note that you can already access the DOM of SVGs by integrating the SVG code directly in the HTML.
It might make sense to be able to access the SVG's DOM when it's integrated via CSS to allow to change it dynamically, though based on the assumption above I assume it would have some impact on speed and memory if a DOM needs to be created for them.

Sebastian

-- 
GitHub Notification of comment by SebastianZ
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1568#issuecomment-311497101 using your GitHub account

Received on Tuesday, 27 June 2017 21:53:42 UTC