File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import { register } from './register'
22import { bind } from './bind'
33import { autoShadowRoot } from './auto-shadow-root'
4- import { wrap } from './wrap'
54
65interface CustomElement {
76 new ( ) : HTMLElement
@@ -14,10 +13,12 @@ interface CustomElement {
1413 * wrapping the classes `connectedCallback` method if needed.
1514 */
1615export function controller ( classObject : CustomElement ) : void {
17- wrap ( classObject . prototype , 'connectedCallback' , function ( this : HTMLElement ) {
16+ const connect = classObject . prototype . connectedCallback
17+ classObject . prototype . connectedCallback = function ( this : HTMLElement ) {
1818 this . toggleAttribute ( 'data-catalyst' , true )
1919 autoShadowRoot ( this )
20+ if ( connect ) connect . call ( this )
2021 bind ( this )
21- } )
22+ }
2223 register ( classObject )
2324}
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments