"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/cdk/platform/platform.ts" between
material2-7.3.6.tar.gz and material2-7.3.7.tar.gz

About: material2 offers Material Design components for Angular.

platform.ts  (material2-7.3.6):platform.ts  (material2-7.3.7)
skipping to change at line 14 skipping to change at line 14
* *
* Use of this source code is governed by an MIT-style license that can be * Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license * found in the LICENSE file at https://angular.io/license
*/ */
import {Inject, Injectable, Optional, PLATFORM_ID} from '@angular/core'; import {Inject, Injectable, Optional, PLATFORM_ID} from '@angular/core';
import {isPlatformBrowser} from '@angular/common'; import {isPlatformBrowser} from '@angular/common';
// Whether the current platform supports the V8 Break Iterator. The V8 check // Whether the current platform supports the V8 Break Iterator. The V8 check
// is necessary to detect all Blink based browsers. // is necessary to detect all Blink based browsers.
const hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8Break let hasV8BreakIterator: boolean;
Iterator);
// We need a try/catch around the reference to `Intl`, because accessing it in s
ome cases can
// cause IE to throw. These cases are tied to particular versions of Windows and
can happen if
// the consumer is providing a polyfilled `Map`. See:
// https://github.com/Microsoft/ChakraCore/issues/3189
// https://github.com/angular/material2/issues/15687
try {
hasV8BreakIterator = (typeof Intl !== 'undefined' && (Intl as any).v8BreakIter
ator);
} catch {
hasV8BreakIterator = false;
}
/** /**
* Service to detect the current platform by comparing the userAgent strings and * Service to detect the current platform by comparing the userAgent strings and
* checking browser-specific global properties. * checking browser-specific global properties.
*/ */
@Injectable({providedIn: 'root'}) @Injectable({providedIn: 'root'})
export class Platform { export class Platform {
/** /**
* Whether the Angular application is being rendered in the browser. * Whether the Angular application is being rendered in the browser.
* We want to use the Angular platform check because if the Document is shimme d * We want to use the Angular platform check because if the Document is shimme d
skipping to change at line 73 skipping to change at line 84
/** Whether the current browser is Safari. */ /** Whether the current browser is Safari. */
// Safari browsers will include the Safari keyword in their userAgent. Some br owsers may fake // Safari browsers will include the Safari keyword in their userAgent. Some br owsers may fake
// this and just place the Safari keyword in the userAgent. To be more safe ab out Safari every // this and just place the Safari keyword in the userAgent. To be more safe ab out Safari every
// Safari browser should also use Webkit as its layout engine. // Safari browser should also use Webkit as its layout engine.
SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && thi s.WEBKIT; SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && thi s.WEBKIT;
/** /**
* @breaking-change 8.0.0 remove optional decorator * @breaking-change 8.0.0 remove optional decorator
*/ */
constructor(@Optional() @Inject(PLATFORM_ID) private _platformId?: Object) { constructor(@Optional() @Inject(PLATFORM_ID) private _platformId?: Object) {
} }
} }
 End of changes. 2 change blocks. 
3 lines changed or deleted 16 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)