@@ -6,7 +6,7 @@ class default_1 extends Controller {
6
6
this . element . innerHTML = '' ;
7
7
this . props = ( _a = this . propsValue ) !== null && _a !== void 0 ? _a : undefined ;
8
8
this . intro = ( _b = this . introValue ) !== null && _b !== void 0 ? _b : undefined ;
9
- this . _dispatchEvent ( 'svelte: connect') ;
9
+ this . dispatchEvent ( ' connect') ;
10
10
const Component = window . resolveSvelteComponent ( this . componentValue ) ;
11
11
this . _destroyIfExists ( ) ;
12
12
this . app = new Component ( {
@@ -15,23 +15,23 @@ class default_1 extends Controller {
15
15
intro : this . intro ,
16
16
} ) ;
17
17
this . element . root = this . app ;
18
- this . _dispatchEvent ( 'svelte: mount', {
18
+ this . dispatchEvent ( ' mount', {
19
19
component : Component ,
20
20
} ) ;
21
21
}
22
22
disconnect ( ) {
23
23
this . _destroyIfExists ( ) ;
24
- this . _dispatchEvent ( 'svelte: unmount') ;
24
+ this . dispatchEvent ( ' unmount') ;
25
25
}
26
26
_destroyIfExists ( ) {
27
27
if ( this . element . root !== undefined ) {
28
28
this . element . root . $destroy ( ) ;
29
29
delete this . element . root ;
30
30
}
31
31
}
32
- _dispatchEvent ( name , payload = { } ) {
32
+ dispatchEvent ( name , payload = { } ) {
33
33
const detail = Object . assign ( { componentName : this . componentValue , props : this . props , intro : this . intro } , payload ) ;
34
- this . element . dispatchEvent ( new CustomEvent ( name , { detail, bubbles : true } ) ) ;
34
+ this . dispatch ( name , { detail, prefix : 'svelte' } ) ;
35
35
}
36
36
}
37
37
default_1 . values = {
0 commit comments