Using mySVGNode.parentNode I get null for an embedded svg file. Ideally I want to reference the embed tag and its id attribute.
I can successfully search the DOM for it, but I am surprised parentNode returns null. Is it not supported for embedded objects?
What you’re looking for is
window.frameElement. See the definition in the html5 spec.Here’s an example.