Comparing version 1.1.0 to 2.0.0
{ | ||
"name": "postis", | ||
"version": "1.1.0", | ||
"description": "Lightway is a wrapper around the PostMessage API", | ||
"version": "2.0.0", | ||
"description": "Lightweight wrapper around the PostMessage API", | ||
"main": "src/index.js", | ||
@@ -14,3 +14,4 @@ "scripts": { | ||
"email": "joao@adtile.me" | ||
}, { | ||
}, | ||
{ | ||
"name": "Jaakko Suutarla", | ||
@@ -17,0 +18,0 @@ "email": "jaakko@adtile.me" |
@@ -12,3 +12,3 @@ function Postis(options) { | ||
var data = JSON.parse(event.data); | ||
var params = [].concat(data.params); | ||
if (data.postis && data.scope === scope) { | ||
@@ -18,7 +18,7 @@ var listenersForMethod = listeners[data.method]; | ||
for (var i = 0; i < listenersForMethod.length; i++) { | ||
listenersForMethod[i].apply(null, params); | ||
listenersForMethod[i].call(null, data.params); | ||
} | ||
} else { | ||
listenBuffer[data.method] = listenBuffer[data.method] || []; | ||
listenBuffer[data.method].push(params); | ||
listenBuffer[data.method].push(data.params); | ||
} | ||
@@ -38,3 +38,3 @@ } | ||
for (var j = 0; j < listenBufferForMethod.length; j++) { | ||
listenersForMethod[i].apply(null, listenBufferForMethod[j]); | ||
listenersForMethod[i].call(null, listenBufferForMethod[j]); | ||
} | ||
@@ -41,0 +41,0 @@ } |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
7893
9
105
1