Sha256: f5464322d738fe8dcc8df60d81a8a8e918087a8e444fb6e0d53a79f505c81069
Contents?: true
Size: 870 Bytes
Versions: 8
Compression:
Stored size: 870 Bytes
Contents
/*global define*/ define(['Core/defined'], function(defined) { "use strict"; var a; /** * Given a URL, determine whether that URL is considered cross-origin to the current page. * * @private */ var isCrossOriginUrl = function(url) { if (!defined(a)) { a = document.createElement('a'); } // copy window location into the anchor to get consistent results // when the port is default for the protocol (e.g. 80 for HTTP) a.href = window.location.href; // host includes both hostname and port if the port is not standard var host = a.host; var protocol = a.protocol; a.href = url; a.href = a.href; // IE only absolutizes href on get, not set return protocol !== a.protocol || host !== a.host; }; return isCrossOriginUrl; });
Version data entries
8 entries across 8 versions & 1 rubygems