Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Postis is a light wrapper around the PostMessage API
$ npm install --save postis
Parent HTML which contains an iframe:
var postis = require("postis");
var targetWindow = document.querySelectorAll("iframe")[0].contentWindow;
var channel = postis({
window: targetWindow,
scope: "scope-for-message-changing-to-avoid-overlapping"
});
channel.ready(function() {
channel.listen("remoteMessageFromChild", function(remoteMessage) {
console.log("remoteMessageFromChild:", remoteMessage);
});
channel.send({
method: "remoteMessageFromParent",
params: { awesome: "messsage",
from: "Parent window"}
});
});
In embedded child iframe:
var postis = require("postis");
var targetWindow = window.parent;
var channel = postis({
window: targetWindow,
scope: "scope-for-message-changing-to-avoid-overlapping"
});
channel.ready(function() {
channel.listen("remoteMessageFromParent", function(remoteMessage) {
console.log("remoteMessageFromParent:", remoteMessage);
});
channel.send({
method: "remoteMessageFromChild",
params: { awesome: "messsage",
from: "child iframe"}
});
});
New releases are prepared in master after merging the PRs. Please include a meaningful changelog entry in PR.
Write a new CHANGELOG.md
entry before running built-in npm version bump and add the change to next commit.
npm version <major | minor | patch>
git push --tags
npm version
should include added changelog entry in the commit. Remember to push changes.
[2.2.0] - 2016-02-01
FAQs
Lightweight wrapper around the PostMessage API
The npm package postis receives a total of 3,513 weekly downloads. As such, postis popularity was classified as popular.
We found that postis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.