# Interactive SVG using \<object\>?

**URL:** https://meta.discourse.org/t/interactive-svg-using-object/173747
**Category:** Self-hosting
**Created:** [December 18, 2020, 5:25pm UTC](https://meta.discourse.org/t/interactive-svg-using-object/173747 "2020-12-18T17:25:01Z")
**Posts on this page:** 1
**Showing post:** 3

<div class="post-metadata">

### Author: ![craigconstantine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/craigconstantine/32/511195_2.png) [@craigconstantine](https://meta.discourse.org/u/craigconstantine)
#### Post date: [December 23, 2020, 1:58am UTC](https://meta.discourse.org/t/interactive-svg-using-object/173747/3 "2020-12-23T01:58:57Z")

</div>

hmmmm, so that’s the easy way.

Is there a hard way I can try?

…because I want to have links in the SVG that change the browser location. Links in the SVG, in an IFRAME, change what’s shown in the IFRAME . . .

I suspect that embedding j/s in the topic, just before the IFRAME, and calling a j/s function in the page onclick in the SVG… that’s not going to work either.

Am I making sense? Should I be adding some thin j/s code ala [Mitigate XSS Attacks with Content Security Policy](https://meta.discourse.org/t/mitigate-xss-attacks-with-content-security-policy/104243) and then trying to call that from within the SVG in the IFRAME? …or is “in the IFRAME” an airtight fortress?

Maybe I should be asking how I can directly inline the SVG into the page? Then use theme-component injected j/s to interact with my other server to dynamically update the SVG?

Cluebat please 🙂

---

_[View the full topic](https://meta.discourse.org/t/interactive-svg-using-object/173747)._
