MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / disconnectedCallback

Method disconnectedCallback

core/src/components/menu/menu.tsx:292–314  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

290 }
291
292 async disconnectedCallback() {
293 /**
294 * The menu should be closed when it is
295 * unmounted from the DOM.
296 * This is an async call, so we need to wait for
297 * this to finish otherwise contentEl
298 * will not have MENU_CONTENT_OPEN removed.
299 */
300 await this.close(false);
301
302 this.blocker.destroy();
303 menuController._unregister(this);
304 if (this.animation) {
305 this.animation.destroy();
306 }
307 if (this.gesture) {
308 this.gesture.destroy();
309 this.gesture = undefined;
310 }
311
312 this.animation = undefined;
313 this.contentEl = undefined;
314 }
315
316 @Listen('ionSplitPaneVisible', { target: 'body' })
317 onSplitPaneChanged(ev: CustomEvent<{ visible: boolean }>) {

Callers

nothing calls this directly

Calls 3

closeMethod · 0.95
destroyMethod · 0.65
_unregisterMethod · 0.65

Tested by

no test coverage detected