File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -672,7 +672,8 @@ export function cloneVNode<T, U>(
672672 ssFallback : vnode . ssFallback && cloneVNode ( vnode . ssFallback ) ,
673673 el : vnode . el ,
674674 anchor : vnode . anchor ,
675- ctx : vnode . ctx
675+ ctx : vnode . ctx ,
676+ ce : vnode . ce
676677 }
677678 if ( __COMPAT__ ) {
678679 defineLegacyVNodeProperties ( cloned as VNode )
Original file line number Diff line number Diff line change @@ -384,6 +384,25 @@ describe('defineCustomElement', () => {
384384 detail : [ 1 ]
385385 } )
386386 } )
387+ // #7293
388+ test ( 'emit in an async component wrapper with properties bound' , async ( ) => {
389+ const E = defineCustomElement (
390+ defineAsyncComponent (
391+ ( ) => new Promise < typeof CompDef > ( res => res ( CompDef as any ) )
392+ )
393+ )
394+ customElements . define ( 'my-async-el-props-emits' , E )
395+ container . innerHTML = `<my-async-el-props-emits id="my_async_el_props_emits"></my-async-el-props-emits>`
396+ const e = container . childNodes [ 0 ] as VueElement
397+ const spy = jest . fn ( )
398+ e . addEventListener ( 'my-click' , spy )
399+ await customElements . whenDefined ( 'my-async-el-props-emits' )
400+ e . shadowRoot ! . childNodes [ 0 ] . dispatchEvent ( new CustomEvent ( 'click' ) )
401+ expect ( spy ) . toHaveBeenCalled ( )
402+ expect ( spy . mock . calls [ 0 ] [ 0 ] ) . toMatchObject ( {
403+ detail : [ 1 ]
404+ } )
405+ } )
387406 } )
388407
389408 describe ( 'slots' , ( ) => {
You can’t perform that action at this time.
0 commit comments