Remove IE9/IE10 workarounds

This commit is contained in:
Alex Dima
2016-12-21 17:08:38 +02:00
parent 14acd45f4e
commit 4056cfc264
24 changed files with 100 additions and 331 deletions

View File

@@ -114,17 +114,9 @@ export function onDidChangeFullscreen(callback: () => void): IDisposable {
const userAgent = navigator.userAgent;
// DOCUMENTED FOR FUTURE REFERENCE:
// When running IE11 in IE10 document mode, the code below will identify the browser as being IE10,
// which is correct because IE11 in IE10 document mode will reimplement all the bugs of IE10
export const isIE11 = (userAgent.indexOf('Trident') >= 0 && userAgent.indexOf('MSIE') < 0);
export const isIE10 = (userAgent.indexOf('MSIE 10') >= 0);
export const isIE9 = (userAgent.indexOf('MSIE 9') >= 0);
export const isIE11orEarlier = isIE11 || isIE10 || isIE9;
export const isIE10orEarlier = isIE10 || isIE9;
export const isIE10orLater = isIE11 || isIE10;
export const isIE = (userAgent.indexOf('Trident') >= 0);
export const isEdge = (userAgent.indexOf('Edge/') >= 0);
export const isEdgeOrIE = isEdge || isIE11 || isIE10 || isIE9;
export const isEdgeOrIE = isIE || isEdge;
export const isOpera = (userAgent.indexOf('Opera') >= 0);
export const isFirefox = (userAgent.indexOf('Firefox') >= 0);
@@ -133,7 +125,7 @@ export const isChrome = (userAgent.indexOf('Chrome') >= 0);
export const isSafari = (userAgent.indexOf('Chrome') === -1) && (userAgent.indexOf('Safari') >= 0);
export const isIPad = (userAgent.indexOf('iPad') >= 0);
export const canUseTranslate3d = !isIE9 && !isFirefox;
export const canUseTranslate3d = !isFirefox;
export const enableEmptySelectionClipboard = isWebKit;
@@ -167,7 +159,7 @@ export function hasCSSAnimationSupport() {
export function supportsExecCommand(command: string): boolean {
return (
(isIE11orEarlier || Platform.isNative)
(isIE || Platform.isNative)
&& document.queryCommandSupported(command)
);
}