Merge pull request #5717 from xtermjs/anthonykim1/constructorFixScreenDpr

Revert useDefineForClassFields, fix screenDpr Constructor
This commit is contained in:
Anthony Kim
2026-02-17 09:38:29 -08:00
committed by GitHub
2 changed files with 4 additions and 3 deletions
+3 -1
View File
@@ -13,7 +13,7 @@ export class CoreBrowserService extends Disposable implements ICoreBrowserServic
private _isFocused = false; private _isFocused = false;
private _cachedIsFocused: boolean | undefined = undefined; private _cachedIsFocused: boolean | undefined = undefined;
private _screenDprMonitor = this._register(new ScreenDprMonitor(this._window)); private _screenDprMonitor: ScreenDprMonitor;
private readonly _onDprChange = this._register(new Emitter<number>()); private readonly _onDprChange = this._register(new Emitter<number>());
public readonly onDprChange = this._onDprChange.event; public readonly onDprChange = this._onDprChange.event;
@@ -27,6 +27,8 @@ export class CoreBrowserService extends Disposable implements ICoreBrowserServic
) { ) {
super(); super();
this._screenDprMonitor = this._register(new ScreenDprMonitor(this._window));
// Monitor device pixel ratio // Monitor device pixel ratio
this._register(this.onWindowChange(w => this._screenDprMonitor.setWindow(w))); this._register(this.onWindowChange(w => this._screenDprMonitor.setWindow(w)));
this._register(EventUtils.forward(this._screenDprMonitor.onDprChange, this._onDprChange)); this._register(EventUtils.forward(this._screenDprMonitor.onDprChange, this._onDprChange));
+1 -2
View File
@@ -9,7 +9,6 @@
"pretty": true, "pretty": true,
"incremental": true, "incremental": true,
"experimentalDecorators": true, "experimentalDecorators": true
"useDefineForClassFields": false
} }
} }