Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
tracker.widgetAdded.connect((sender, widget) => {
const console = widget.content.console;
const handler = new ForeignHandler({
session: console.session,
parent: console
});
Private.foreignHandlerProperty.set(console, handler);
console.disposed.connect(() => {
handler.dispose();
});
});