svg-injector icon indicating copy to clipboard operation
svg-injector copied to clipboard

Accessing original element in beforeEach

Open vizo opened this issue 1 year ago • 4 comments

Can i get original element before transformation in beforeEach? I need to apply some attributes as original img tag has.

Thanks in advance!

vizo avatar Aug 31 '22 12:08 vizo

Hi @vizo, which element are you looking to apply attributes to? You can access the SVG DOM element in beforeEach, e.g. here.

tanem avatar Sep 09 '22 20:09 tanem

Closing due to inactivity.

tanem avatar Sep 23 '22 19:09 tanem

Hi @vizo, which element are you looking to apply attributes to? You can access the SVG DOM element in beforeEach, e.g. here.

I want to access original img element before transformation in beforeEach, not new SVG element.

vizo avatar Sep 26 '22 10:09 vizo

I want to access original img element before transformation in beforeEach, not new SVG element.

👍

What attributes are you looking to apply, do you have a code example I can look at? (Some attributes are automatically transferred). Alternatively, some custom code written prior to injection might get the job done.

tanem avatar Oct 02 '22 17:10 tanem

Inactive again, can reopen if need be.

tanem avatar Nov 19 '22 18:11 tanem