* Throws a protocol-relative URL error indicating that protocol-relative URLs are not allowed.
(urlStr: string)
| 140 | * Throws a protocol-relative URL error indicating that protocol-relative URLs are not allowed. |
| 141 | */ |
| 142 | function throwProtocolRelativeUrlError(urlStr: string): never { |
| 143 | throw new RuntimeError( |
| 144 | RuntimeErrorCode.PROTOCOL_RELATIVE_URL_NOT_ALLOWED, |
| 145 | typeof ngDevMode === 'undefined' || ngDevMode |
| 146 | ? `Protocol relative URLs are not allowed in this context. URL: ${urlStr}` |
| 147 | : urlStr, |
| 148 | ); |
| 149 | } |
| 150 | |
| 151 | /** |
| 152 | * Throws a suspicious URL error indicating a security bypass attempt. |