Using the specified function to send a message, but receiving the error "DataCloneError: object cannot be cloned." at Line "target ['postMessage'] (message, target_url.replace (/ ([^:] +: // [^ /] +). * /, '$ 1'));" in FireFox-34, the same code works fine in Chrome and an older version of FireFox.
var storage = function() {
return {
postMessage : function(message, target_url, target) {
if (!target_url) {
return;
}
var target = target || parent;
if (target['postMessage']) {
target['postMessage'](message, target_url.replace( /([^:]+:\/\/[^\/]+).*/, '$1'));
}
}
}
}();
source
share