cors-storage
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -1,1 +0,1 @@ | ||
!function(){"use strict";function t(t,o){for(var r in o)t[r]=o[r];return t}function o(t,o,r){this.data=t,this.source=o,this.origin=r}o.prototype={constructor:o,post:function(o){this.source.postMessage(JSON.stringify(t({},o||{},this.data._requestID)),this.origin)},postData:function(t){this.post({data:t})},postError:function(t){this.post({error:t})}},function(t){window.addEventListener("message",function(r){var i=JSON.parse(r.data),n=r.source,s=r.origin;t(new o(i,n,s))},!1)}(function(t){var o=t.data,r=t.postError.bind(t),i=t.postData.bind(t);if(!o.obj)return r('missing "obj" property');var n=window[o.obj];if(!n)return r(o.obj+" not supported");if(!o.op)return r('missing "op" property');if(!(o.op in n))return r("method does not exists "+o.obj+"."+o.op);try{i(n[o.op].apply(n,o.args||[]))}catch(t){r(t.message)}})}(); | ||
!function(){"use strict";function t(t,o){for(var r in o)t[r]=o[r];return t}function o(t,o,r){this.data=t,this.source=o,this.origin=r}o.prototype={constructor:o,post:function(o){var r=t({},o||{});r=t(r,{_requestID:this.data._requestID}),this.source.postMessage(JSON.stringify(r),this.origin)},postData:function(t){this.post({data:t})},postError:function(t){this.post({error:t})}},function(t){window.addEventListener("message",function(r){var i=JSON.parse(r.data),s=r.source,n=r.origin;t(new o(i,s,n))},!1)}(function(t){var o=t.data,r=t.postError.bind(t),i=t.postData.bind(t);if(!o.obj)return r('missing "obj" property');var s=window[o.obj];if(!s)return r(o.obj+" not supported");if(!o.op)return r('missing "op" property');if(!(o.op in s))return r("method does not exists "+o.obj+"."+o.op);try{i(s[o.op].apply(s,o.args||[]))}catch(t){r(t.message)}})}(); |
@@ -91,3 +91,5 @@ import Promise from 'pinkie-promise'; | ||
//IE8 and IE9 need target will be iframe domain (for mystic security reasons) | ||
this.frame.contentWindow.postMessage(JSON.stringify(merge({}, data, { _requestID: id })), this.baseUrl); | ||
data = merge({}, data); | ||
data = merge(data, { _requestID: id }); | ||
this.frame.contentWindow.postMessage(JSON.stringify(data), this.baseUrl); | ||
} else { | ||
@@ -94,0 +96,0 @@ this.preLoadQueue.push({ data: data, resolve: _resolve, reject: _reject }); |
{ | ||
"name": "cors-storage", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -86,3 +86,5 @@ import { contentLoaded } from "document-promises-pinkie"; | ||
//IE8 and IE9 need target will be iframe domain (for mystic security reasons) | ||
this.frame.contentWindow.postMessage(JSON.stringify(merge({}, data, { _requestID: id })), this.baseUrl); | ||
data = merge({}, data); | ||
data = merge(data, { _requestID: id }); | ||
this.frame.contentWindow.postMessage(JSON.stringify(data), this.baseUrl); | ||
} else { | ||
@@ -89,0 +91,0 @@ this.preLoadQueue.push({ data: data, resolve: _resolve, reject: _reject }); |
@@ -13,3 +13,5 @@ import merge from "./merge"; | ||
post: function(msg) { | ||
this.source.postMessage(JSON.stringify(merge({}, msg || {}, { _requestID: this.data._requestID })), this.origin); | ||
var data = merge({}, msg || {}); | ||
data = merge(data, { _requestID: this.data._requestID }); | ||
this.source.postMessage(JSON.stringify(data), this.origin); | ||
}, | ||
@@ -16,0 +18,0 @@ |
Sorry, the diff of this file is not supported yet
AI-detected possible typosquat
Supply chain riskAI has identified this package as a potential typosquat of a more popular package. This suggests that the package may be intentionally mimicking another package's name, description, or other metadata.
Found 1 instance in 1 package
13137
355
1