Currently, I am customizing the default Twitter widget that can be embedded on a website. While successfully injecting styles and making it work perfectly, I recently discovered that after injecting my styles, clicking on a Tweet no longer opens it in a new page. I am injecting styles like this:
const iframeDocument = iframe.contentWindow.document;
const injectedStyle = `<style>${css}</style>`;
iframeDocument.body.innerHTML = iframeDocument.body.innerHTML + injectedStyle;
I had to use this method because passing a <link>
with a .css file doesn't function here. When the above code is executed, "Event" disappears in Firefox Inspector - I want to understand why this happens and if there is a way to inject my style while still allowing Tweets to be clickable.