
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
msg-js-ipc (msg JavaScript Inter Process Communication) handles the communication between two windows on different domains
Inter-Process-Communication (IPC) Library for JavaScript. This Library enables communicating between two windows on different domains. The communication can be bidirectional, so every window itself can be both a sender and a recipient. To make the communication between two windows work, both of them must include the same version of msg-js-ipc.
msg-js-ipc is based on please.js, a Request/Response based wrapper around the PostMessage API that makes use of jQuery Promises. please.js itself is based on top of jQuery and the jQuery Promise API.
Before start using msg-js-ipc, you must make sure that both windows have msg-js-ipc loaded and thus the global object IPC is available.
Install with npm
$ npm install msg-js-ipc
or download source.
##Usage
###Sender
To send an event, just call the method sendEvent on the global object IPC.
IPC.sendEvent(window.parent, 'ipc_infoText', text)
The method sendEvent has the following parameter:
For example we have a window A that includes an iFrame B. Then the target window of A is the iFrame B ($('iframe').get(0).contentWindow) and the target window of the iFrame B is the window A (window.parent).
In case the sender tries to call a method the recipient has not implemented, an error is thrown from the
msg-js-ipcLibrary.
###Recipient
To receive an event, the recipient must register its implementation on the global object IPC.
IPC.registerRecipient(this)
Furthermore the recipient has to implement the methods, that the sender wants to call.
ipc_infoText (text) {
// the implementation of the method
// here u can give the information back in the application and convert it to the applications architecture
},
All methods, the recipient provides for the communication with a sender, must start with the prefix
ipc_. That is for security reason to avoid that everything the recipient implements can be called from a sender. Only through the prefixipc_the method is available for a sender. If the sender tries to call a method, that does not start with the prefixipc_, an error is thrown from themsg-js-ipcLibrary.
FAQs
msg-js-ipc (msg JavaScript Inter Process Communication) handles the communication between two windows on different domains
We found that msg-js-ipc demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.