From ba1274ba129541a44c2c6ea264f82eb796e675a3 Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Sat, 10 Aug 2019 14:31:14 -0700 Subject: [PATCH] Remove applyAddon, stabilize loadAddon Fixes #2076 --- demo/start.js | 3 --- src/public/Terminal.ts | 3 --- typings/xterm.d.ts | 10 +--------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/demo/start.js b/demo/start.js index a054e939..a14627c1 100644 --- a/demo/start.js +++ b/demo/start.js @@ -20,9 +20,6 @@ startServer(); * For production builds see `webpack.config.js` in the root directory. If that is built the demo * can use that by switching out which `Terminal` is imported in `client.ts`, this is useful for * validating that the packaged version works correctly. - * - * The addons are not webpacked right now and are built directly to `lib/` via `tsc` as they are - * the legacy format (`applyAddon`) and will be removed soon anyway. */ const clientConfig = { entry: path.resolve(__dirname, 'client.ts'), diff --git a/src/public/Terminal.ts b/src/public/Terminal.ts index 5d270ca7..6c12866c 100644 --- a/src/public/Terminal.ts +++ b/src/public/Terminal.ts @@ -164,9 +164,6 @@ export class Terminal implements ITerminalApi { public reset(): void { this._core.reset(); } - public static applyAddon(addon: any): void { - addon.apply(Terminal); - } public loadAddon(addon: ITerminalAddon): void { return this._addonManager.loadAddon(this, addon); } diff --git a/typings/xterm.d.ts b/typings/xterm.d.ts index d9e28b26..e9c83ad2 100644 --- a/typings/xterm.d.ts +++ b/typings/xterm.d.ts @@ -807,15 +807,7 @@ declare module 'xterm' { reset(): void /** - * Applies an addon to the Terminal prototype, making it available to all - * newly created Terminals. - * @param addon The addon to apply. - * @deprecated Use the new loadAddon API/addon format. - */ - static applyAddon(addon: any): void; - - /** - * (EXPERIMENTAL) Loads an addon into this instance of xterm.js. + * Loads an addon into this instance of xterm.js. * @param addon The addon to load. */ loadAddon(addon: ITerminalAddon): void;