getStyle doesn't work
I have
In practice, the iframe will be injected, but the styling won't apply
content.tscontent.ts:export const config: PlasmoContentScript = {...};
export const getStyle: PlasmoGetStyle () => {
const elStyle = document.createElement("style");
elStyle.textContent = `
.iframe-bst {
width: 100%;
height: 500px;
background-color: white;
}
`;
return elStyle;
};
const elIframe = document.createElement("iframe");
elIframe.src = "";
elIframe.classList.add("iframe-bst");
const elParent = document.querySelector(".selector");
elParent.append(elIframe);export const config: PlasmoContentScript = {...};
export const getStyle: PlasmoGetStyle () => {
const elStyle = document.createElement("style");
elStyle.textContent = `
.iframe-bst {
width: 100%;
height: 500px;
background-color: white;
}
`;
return elStyle;
};
const elIframe = document.createElement("iframe");
elIframe.src = "";
elIframe.classList.add("iframe-bst");
const elParent = document.querySelector(".selector");
elParent.append(elIframe);In practice, the iframe will be injected, but the styling won't apply