content-ui-inject
Boost content-ui injection for better extension developer experience.
Boost content-ui injection for better extension developer experience.
- Inject shadowRoot to content-ui
import { createShadowRootUI } from 'content-ui-injector'
const app = await createShadowRootUI({
name: 'react-boilerplate',
position: 'inline',
injectAnchor: 'body',
injectMode: 'before',
styleOptions: {
textContent: tailwindcssOutput,
},
onCustomize: (uiContainer, shadowHost) => {
shadowHost.style.zIndex = '9999'
shadowHost.id = 'xxx'
},
onMount: (uiContainer) => {
createRoot(uiContainer).render(<App />)
},
})
app.mount()
MIT License © 2023-PRESENT leizhenpeng