Use URL objects for external URLs
Repository details (talkie)
- Project page
- talkie
- Project log category
- talkie (708 entries)
- Repository
- @joelpurra/talkie
- Owner
- @joelpurra
- Issues
- Issues on Github
- Contributors
- Contributors on Github
- Project status
- ⏲️ This project has had recent commits.
- 📂 This project is open.
- 🌠 This project is popular.
- Repository activity period
- 🗓—
- Commits
- 751 commits
- Stars
- 71 stars
Commit details (93a05073)
- Author
- Joel Purra
- Authored at
- Committer
- Joel Purra
- Committed 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.
Raw text
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.