This repository has been archived by the owner on Apr 4, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The current implementation of the DOM helper’s `protocolForURL` relies on the implicit parsing and normalization that the browser’s DOM does when setting the A element’s `href` property. However, the DOM helper is often used with subset DOM implementations like simple-dom. In those cases, we cannot rely on this normalization. This commit detects when URL parsing doesn’t happen when setting the `href` property on an `A` element and falls back to using Node’s `URL` package.
- Loading branch information