debt - remove some any casts from window
This commit is contained in:
parent
8e12a92976
commit
13aca0a170
3 changed files with 7 additions and 7 deletions
|
@ -410,9 +410,9 @@ export function getClientArea(element: HTMLElement): Dimension {
|
|||
}
|
||||
|
||||
// If visual view port exits and it's on mobile, it should be used instead of window innerWidth / innerHeight, or document.body.clientWidth / document.body.clientHeight
|
||||
if (platform.isIOS && (<any>window).visualViewport) {
|
||||
const width = (<any>window).visualViewport.width;
|
||||
const height = (<any>window).visualViewport.height - (
|
||||
if (platform.isIOS && window.visualViewport) {
|
||||
const width = window.visualViewport.width;
|
||||
const height = window.visualViewport.height - (
|
||||
browser.isStandalone
|
||||
// in PWA mode, the visual viewport always includes the safe-area-inset-bottom (which is for the home indicator)
|
||||
// even when you are using the onscreen monitor, the visual viewport will include the area between system statusbar and the onscreen keyboard
|
||||
|
|
|
@ -50,7 +50,7 @@ class StandardPointerHandler extends MouseHandler implements IDisposable {
|
|||
this._installGestureHandlerTimeout = -1;
|
||||
|
||||
// TODO@Alex: replace the usage of MSGesture here with something that works across all browsers
|
||||
if ((<any>window).MSGesture) {
|
||||
if (window.MSGesture) {
|
||||
const touchGesture = new MSGesture();
|
||||
const penGesture = new MSGesture();
|
||||
touchGesture.target = this.viewHelper.linesContentDomNode;
|
||||
|
@ -226,9 +226,9 @@ export class PointerHandler extends Disposable {
|
|||
super();
|
||||
if ((platform.isIOS && BrowserFeatures.pointerEvents)) {
|
||||
this.handler = this._register(new PointerEventHandler(context, viewController, viewHelper));
|
||||
} else if ((<any>window).TouchEvent) {
|
||||
} else if (window.TouchEvent) {
|
||||
this.handler = this._register(new TouchHandler(context, viewController, viewHelper));
|
||||
} else if (window.navigator.pointerEnabled || (<any>window).PointerEvent) {
|
||||
} else if (window.navigator.pointerEnabled || window.PointerEvent) {
|
||||
this.handler = this._register(new StandardPointerHandler(context, viewController, viewHelper));
|
||||
} else {
|
||||
this.handler = this._register(new MouseHandler(context, viewController, viewHelper));
|
||||
|
|
|
@ -377,5 +377,5 @@ function _processIconThemeDocument(id: string, iconThemeDocumentLocation: URI, i
|
|||
return result;
|
||||
}
|
||||
function escapeCSS(str: string) {
|
||||
return (<any>window)['CSS'].escape(str);
|
||||
return window.CSS.escape(str);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue