Skip to content Skip to sidebar Skip to footer

Accessing Elements Of Embedded File

I have a svg file which I am accessing through my javascript. Like this this.m_svg = new Element('embed'); this.m_svg.setAttribute('src','img/gauge.svg'); I was in-lining svg be

Solution 1:

I've created an example and pushed it to git repository. I've used the SVG image which you've provided in this question. It's working well, but there is one problem - the background image from img/gauge.png is not loading second time.

So current question seems answered, but the question with that image from SVG file is still open.

The work-around is to use the gauge.png image as a background-image of div element (which is a container for object element) and remove it from SVG at all.

Though I'll maybe play with it again later.

Post a Comment for "Accessing Elements Of Embedded File"