feat(common): add APIs to read component pieces of URL (#30055)

Without this change, the framework doesn't surface URL parts such as hostname, protocol, and port. This makes it difficult to rebuild a complete URL. This change provides new APIs to read these values.

PR Close #30055
This commit is contained in:
Jason Aden
2019-02-11 10:56:50 -08:00
committed by Ben Lesh
parent b44b14368f
commit b635fe80cc
6 changed files with 40 additions and 2 deletions

View File

@ -35,6 +35,9 @@ export abstract class PlatformLocation {
abstract onPopState(fn: LocationChangeListener): void;
abstract onHashChange(fn: LocationChangeListener): void;
abstract get protocol(): string;
abstract get hostname(): string;
abstract get port(): string;
abstract get pathname(): string;
abstract get search(): string;
abstract get hash(): string;