Sha256: 1d0848aacae54da1f7053d56df3787f4760aae25d5cbbd9d30982e539fd81300

Contents?: true

Size: 1.41 KB

Versions: 1

Compression:

Stored size: 1.41 KB

Contents

o: ActiveSupport::Cache::Entry	:@compressedF:@expires_in0:@created_atf1372843464.4873059:@value":{I"
class:EFI"BundledAsset;FI"logical_path;FI"Core/isCrossOriginUrl.js;TI"
pathname;FI"U/Users/bwrona/www/engines/cesium/app/assets/javascripts/Core/isCrossOriginUrl.js;TI"content_type;FI"application/javascript;FI"
mtime;FI"2013-07-03T11:02:49+02:00;FI"length;Fi\I"digest;F"%b8b4b5b21bde4b8841d144bad60944d1I"source;FI"\/*global define*/

define(function() {
    "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 (typeof a === 'undefined') {
            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;
});
;FI"required_assets_digest;F"%42cfb0d21edd805f81cc29447b16fad8I"
_version;F"%6776f581a4329e299531e1d52aa59832

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cesium-0.18.0 test/dummy/tmp/cache/assets/D0D/C70/sprockets%2F49e077d35fbd330a7ed65eb75109a081