From d32e0d88f88def586dd24969667ddfbe3a50544f Mon Sep 17 00:00:00 2001 From: harlan Date: Sat, 6 Jul 2024 18:05:34 +1000 Subject: [PATCH] fix!: `ScriptCarbonAds` prefer `ready` event --- src/runtime/components/ScriptCarbonAds.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/runtime/components/ScriptCarbonAds.vue b/src/runtime/components/ScriptCarbonAds.vue index d3a322b3..ecc2f6fb 100644 --- a/src/runtime/components/ScriptCarbonAds.vue +++ b/src/runtime/components/ScriptCarbonAds.vue @@ -14,7 +14,7 @@ const props = defineProps<{ const emit = defineEmits<{ error: [error: string | Event] - load: [] + ready: [HTMLScriptElement] }>() const attrId = `_carbonads_js` @@ -40,7 +40,7 @@ function loadCarbon() { } script.onload = () => { status.value = 'loaded' - emit('load') + emit('ready', script) } carbonadsEl.value.appendChild(script) }