<commit_before>+function (RPC, util) {
    RPC.Transport = function (config) {
        var me = this, stack = [];
        util.eventEmiter(this);

        var query = {}, transport;
        if (config.acl && !util.checkAcl(config.acl, util.path.getDomain(config.remote))) {
            throw new Error("Access denied for " + config.remote);
        }
        
        if (!config.props) {
            config.props = {};
        }

        if (config.isHost) {
            if (window.postMessage || document.postMessage) {
                /*
                 * This is supported in IE8+, Firefox 3+, Opera 9+, Chrome 2+ and Safari 4+
                 */
                config.protocol = "0";
            } else {
                /*
                 * This is supported in all browsers where [window].location is writable for all
                 * The resize event will be used if resize is supported and the iframe is not put
                 * into a container, else polling will be used.
                 */
                config.protocol = "0";
            }
        } else {
            query = util.windowName.get('RPC');
            config.channel  = query.channel;
            config.protocol = query.protocol;
            config.remote   = query.remote;
            config.helper   = query.helper;
            if (query.remoteDomain === document.domain) {
                config.isSameOrigin = true;
            } else {
                config.isSameOrigin = false;
            }
        }
<commit_msg>fix postMessage<commit_after>+function (RPC, util) {
    RPC.Transport = function (config) {
        var me = this, stack = [];
        util.eventEmiter(this);

        var query = {}, transport;
        if (config.acl && !util.checkAcl(config.acl, util.path.getDomain(config.remote))) {
            throw new Error("Access denied for " + config.remote);
        }
        
        if (!config.props) {
            config.props = {};
        }

        if (config.isHost) {
            if (window.postMessage || document.postMessage) {
                /*
                 * This is supported in IE8+, Firefox 3+, Opera 9+, Chrome 2+ and Safari 4+
                 */
                config.protocol = "1";
            } else {
                /*
                 * This is supported in all browsers where [window].location is writable for all
                 * The resize event will be used if resize is supported and the iframe is not put
                 * into a container, else polling will be used.
                 */
                config.protocol = "0";
            }
        } else {
            query = util.windowName.get('RPC');
            config.channel  = query.channel;
            config.protocol = query.protocol;
            config.remote   = query.remote;
            config.helper   = query.helper;
            if (query.remoteDomain === document.domain) {
                config.isSameOrigin = true;
            } else {
                config.isSameOrigin = false;
            }
        }

{'fraction_non_alphanumeric': 0.1037673496364838, 'fraction_numerical': 0.004626569729015202, 'mean_word_length': 1.3465116279069766, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4393011', 'n_tokens_mistral': 789, 'n_tokens_neox': 744, 'n_words': 213}