Skip to content

Commit 037baff

Browse files
crisbetommalerba
authored andcommitted
docs(platform): remove comment from API docs (#17299)
Removes a comment, that was providing context about why the code works a certain way, from the API docs that show up on material.angular.io.
1 parent 5874ff9 commit 037baff

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

src/cdk/platform/platform.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,10 @@ try {
3030
*/
3131
@Injectable({providedIn: 'root'})
3232
export class Platform {
33-
/**
34-
* Whether the Angular application is being rendered in the browser.
35-
* We want to use the Angular platform check because if the Document is shimmed
36-
* without the navigator, the following checks will fail. This is preferred because
37-
* sometimes the Document may be shimmed without the user's knowledge or intention
38-
*/
33+
// We want to use the Angular platform check because if the Document is shimmed
34+
// without the navigator, the following checks will fail. This is preferred because
35+
// sometimes the Document may be shimmed without the user's knowledge or intention
36+
/** Whether the Angular application is being rendered in the browser. */
3937
isBrowser: boolean = this._platformId ?
4038
isPlatformBrowser(this._platformId) : typeof document === 'object' && !!document;
4139

@@ -45,42 +43,41 @@ export class Platform {
4543
/** Whether the current rendering engine is Microsoft Trident. */
4644
TRIDENT: boolean = this.isBrowser && /(msie|trident)/i.test(navigator.userAgent);
4745

48-
/** Whether the current rendering engine is Blink. */
4946
// EdgeHTML and Trident mock Blink specific things and need to be excluded from this check.
47+
/** Whether the current rendering engine is Blink. */
5048
BLINK: boolean = this.isBrowser && (!!((window as any).chrome || hasV8BreakIterator) &&
5149
typeof CSS !== 'undefined' && !this.EDGE && !this.TRIDENT);
5250

53-
/** Whether the current rendering engine is WebKit. */
5451
// Webkit is part of the userAgent in EdgeHTML, Blink and Trident. Therefore we need to
5552
// ensure that Webkit runs standalone and is not used as another engine's base.
53+
/** Whether the current rendering engine is WebKit. */
5654
WEBKIT: boolean = this.isBrowser &&
5755
/AppleWebKit/i.test(navigator.userAgent) && !this.BLINK && !this.EDGE && !this.TRIDENT;
5856

5957
/** Whether the current platform is Apple iOS. */
6058
IOS: boolean = this.isBrowser && /iPad|iPhone|iPod/.test(navigator.userAgent) &&
6159
!('MSStream' in window);
6260

63-
/** Whether the current browser is Firefox. */
6461
// It's difficult to detect the plain Gecko engine, because most of the browsers identify
6562
// them self as Gecko-like browsers and modify the userAgent's according to that.
6663
// Since we only cover one explicit Firefox case, we can simply check for Firefox
6764
// instead of having an unstable check for Gecko.
65+
/** Whether the current browser is Firefox. */
6866
FIREFOX: boolean = this.isBrowser && /(firefox|minefield)/i.test(navigator.userAgent);
6967

7068
/** Whether the current platform is Android. */
7169
// Trident on mobile adds the android platform to the userAgent to trick detections.
7270
ANDROID: boolean = this.isBrowser && /android/i.test(navigator.userAgent) && !this.TRIDENT;
7371

74-
/** Whether the current browser is Safari. */
7572
// Safari browsers will include the Safari keyword in their userAgent. Some browsers may fake
7673
// this and just place the Safari keyword in the userAgent. To be more safe about Safari every
7774
// Safari browser should also use Webkit as its layout engine.
75+
/** Whether the current browser is Safari. */
7876
SAFARI: boolean = this.isBrowser && /safari/i.test(navigator.userAgent) && this.WEBKIT;
7977

8078
/**
8179
* @breaking-change 8.0.0 remove optional decorator
8280
*/
83-
constructor(@Optional() @Inject(PLATFORM_ID) private _platformId?: Object) {
84-
}
81+
constructor(@Optional() @Inject(PLATFORM_ID) private _platformId?: Object) {}
8582
}
8683

0 commit comments

Comments
 (0)