Replies: 2 comments 2 replies
-
No, I'm afraid. But it's good idea to add also To add event you only need to add: fire_event('onBeforeDestroy', []) and probably good idea to check if the value is false and don't execute if (fire_event('onBeforeDestroy', []) === false) {
return this;
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
I am wrapping import { onMount, onDestroy } from 'svelte';
export let termIns: JQueryTerminal = Object.create(null);
let jqTermContainerEl: HTMLElement;
let termDefaultOpts: JQueryTerminal.TerminalOptions;
onMount(() => {
termIns = jQuery(jqTermContainerEl).terminal(termInterp, {...termDefaultOpts, ...termOpts});
});
onDestroy(() => {
//Should we call it here before termIns.destroy()?
termIns.fire_event('onBeforeDestroy', []) // <= ERR: fire_event is not a function
if (termIns) termIns.purge().destroy();
}); Thanks, |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is there any like
onBeforeDestroy()
callback or something similar to call before terminal got destroyterm.destroy()
?Thanks,
Beta Was this translation helpful? Give feedback.
All reactions