How to inject React component on page?
Hi I want to render an icon next to a div on the webpage and when that icon is clicked I want to render a React component on the top right of the page. I've found docs on how to inject a React component on the page but I'm not sure how to render it based on clicking another component. Thanks!
1 Reply
@h123
You can add it with iframe what you made in tabs folder.
try this:
const iframe = document.createElement("iframe")
iframe.src = chrome.runtime.getURL("/tabs/left-content.html")
iframe.name = "left-content"
document.body.appendChild(iframe)