Skip to content

Commit fc45c37

Browse files
committed
docs: Add missing await to createShadowRootUi examples
This closes #374
1 parent 68874e6 commit fc45c37

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/guide/content-script-ui.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,9 @@ export default defineContentScript({
254254
// 2. Set cssInjectionMode
255255
cssInjectionMode: 'ui',
256256

257-
main(ctx) {
257+
async main(ctx) {
258258
// 3. Define your UI
259-
const ui = createShadowRootUi(ctx, {
259+
const ui = await createShadowRootUi(ctx, {
260260
name: 'example-ui',
261261
position: 'inline',
262262
anchor: '#anchor',
@@ -288,9 +288,9 @@ export default defineContentScript({
288288
// 2. Set cssInjectionMode
289289
cssInjectionMode: 'ui',
290290

291-
main(ctx) {
291+
async main(ctx) {
292292
// 3. Define your UI
293-
const ui = createShadowRootUi(ctx, {
293+
const ui = await createShadowRootUi(ctx, {
294294
name: 'example-ui',
295295
position: 'inline',
296296
anchor: '#anchor',
@@ -323,9 +323,9 @@ export default defineContentScript({
323323
// 2. Set cssInjectionMode
324324
cssInjectionMode: 'ui',
325325

326-
main(ctx) {
326+
async main(ctx) {
327327
// 3. Define your UI
328-
const ui = createShadowRootUi(ctx, {
328+
const ui = await createShadowRootUi(ctx, {
329329
name: 'example-ui',
330330
position: 'inline',
331331
anchor: '#anchor',

0 commit comments

Comments
 (0)