You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
15 lines
420 B
15 lines
420 B
3 months ago
|
import platform from '../platform/index.js';
|
||
|
|
||
|
export default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {
|
||
|
url = new URL(url, platform.origin);
|
||
|
|
||
|
return (
|
||
|
origin.protocol === url.protocol &&
|
||
|
origin.host === url.host &&
|
||
|
(isMSIE || origin.port === url.port)
|
||
|
);
|
||
|
})(
|
||
|
new URL(platform.origin),
|
||
|
platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)
|
||
|
) : () => true;
|