This is a similar question but I would like to know how to access the SVG's JavaScript functions when they are not embedded but are imported from an external file:
Call svg javascript function inside html javascript function
So, I'll attempt to make my question clear and hopefully not too convoluted.
I have main.html and main.js.
I also have someSVG.svg which imports someSVG.js which has a function, foo().
main.html imports someSVG.svg as an object element.
How do I call foo() from main.js?