Skip to content

Commit d32e0d8

Browse files
committed
fix!: ScriptCarbonAds prefer ready event
1 parent 21c7e89 commit d32e0d8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/runtime/components/ScriptCarbonAds.vue

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const props = defineProps<{
1414
1515
const emit = defineEmits<{
1616
error: [error: string | Event]
17-
load: []
17+
ready: [HTMLScriptElement]
1818
}>()
1919
2020
const attrId = `_carbonads_js`
@@ -40,7 +40,7 @@ function loadCarbon() {
4040
}
4141
script.onload = () => {
4242
status.value = 'loaded'
43-
emit('load')
43+
emit('ready', script)
4444
}
4545
carbonadsEl.value.appendChild(script)
4646
}

0 commit comments

Comments
 (0)