()
| 159 | * @deprecated This is no longer used and will be removed in a future major version. |
| 160 | */ |
| 161 | export function supportsReferrerPolicy(): boolean { |
| 162 | // Despite all stars in the sky saying that Edge supports old draft syntax, aka 'never', 'always', 'origin' and 'default' |
| 163 | // (see https://caniuse.com/#feat=referrer-policy), |
| 164 | // it doesn't. And it throws an exception instead of ignoring this parameter... |
| 165 | // REF: https://github.com/getsentry/raven-js/issues/1233 |
| 166 | |
| 167 | if (!_isFetchSupported()) { |
| 168 | return false; |
| 169 | } |
| 170 | |
| 171 | try { |
| 172 | new Request('_', { |
| 173 | referrerPolicy: 'origin' as ReferrerPolicy, |
| 174 | }); |
| 175 | return true; |
| 176 | } catch { |
| 177 | return false; |
| 178 | } |
| 179 | } |
nothing calls this directly
no test coverage detected