Joel Purra: Developer and more


Use URL objects for external URLs

Repository details (talkie)
Project page
talkie
Project category
(588 entries)
Repository
talkie on Github@joelpurra/talkie
Owner
joelpurra on Github@joelpurra
Commit details (93a05073)
Author
Authored at
Commiter
Joel Purra
Commited at

Commit message

Use URL objects for external URLs

- Prefer URL objects over strings to clearly distinguish the intent on a type level.
- Currently only used for external URLs.
- Cannot be (plainly) used for internal URLs, as they are always defined as relative.
  - URL objects require a base URL string when used with relative URL strings.
  - The base URL of web extensions contains the extension id, which is known for published extensions.
  - During webext debugging, a temporary id is generated, so the the base URL would need to be resolved at runtime.
  - Could use `IInternalUrlProvider` for each interal URL object creation/validation, but at this time chose not to.

Changed files (10)

Commit categories (3)