{"id":21417910,"url":"https://github.com/msg-systems/ipcjs","last_synced_at":"2025-07-14T05:30:28.440Z","repository":{"id":57276534,"uuid":"50118000","full_name":"msg-systems/ipcjs","owner":"msg-systems","description":"Inter-Process-Communication (IPC) JavaScript Library","archived":false,"fork":false,"pushed_at":"2016-11-09T11:43:34.000Z","size":219,"stargazers_count":1,"open_issues_count":0,"forks_count":3,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-11T20:35:45.575Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msg-systems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-21T15:51:38.000Z","updated_at":"2020-06-30T05:46:38.000Z","dependencies_parsed_at":"2022-09-01T21:51:20.896Z","dependency_job_id":null,"html_url":"https://github.com/msg-systems/ipcjs","commit_stats":null,"previous_names":["msg-systems/msg-js-ipc"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msg-systems%2Fipcjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msg-systems%2Fipcjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msg-systems%2Fipcjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msg-systems%2Fipcjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msg-systems","download_url":"https://codeload.github.com/msg-systems/ipcjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225893458,"owners_count":17540916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-22T19:18:06.236Z","updated_at":"2024-11-22T19:18:06.795Z","avatar_url":"https://github.com/msg-systems.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipcjs\nInter-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 `ipcjs`.\n\n`ipcjs` is based on [please.js](https://github.com/wingify/please.js), a Request/Response based wrapper around the PostMessage API that makes use of jQuery Promises. [please.js](https://github.com/wingify/please.js) itself is based on top of jQuery and the jQuery Promise API.\n\n\n## Installation\n\nBefore start using `ipcjs`, you must make sure that both windows have `ipcjs` loaded and thus the global object `IPC` is available.\n\nInstall with npm\n\n\t$ npm install ipcjs\n\nor [download](https://github.com/msg-systems/ipcjs/blob/master/dist/ipcjs.js) source.\n\n##Usage\n\n###Sender\n\nTo send an event, just call the method `sendEvent` on the global object `IPC`.\n\n\t\tIPC.sendEvent(window.parent, 'ipc_infoText', text)\n\nThe method `sendEvent` has the following parameter:\n\n1. The target window (recipient)\n2. The name of the recipient's method as string\n3. [optional] further parameters (0-n), as many as the implementation of the given method expects\n\n\nFor 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`).\n\n\u003e __In case the sender tries to call a method the recipient has not implemented, an error is thrown from the `ipcjs` Library.__\n\n###Recipient\n\nTo receive an event, the recipient must register its implementation on the global object `IPC`.\n\n\t\tIPC.registerRecipient(this)\n\nFurthermore the recipient has to implement the methods, that the sender wants to call.\n\n\t\tipc_infoText (text) {\n            // the implementation of the method\n            // here u can give the information back in the application and convert it to the applications architecture\n        },\n \n\u003e __All methods, the recipient provides for the communication with a sender, must start with the prefix  `ipc_`.\nThat is for security reason to avoid that everything the recipient implements can be called from a sender. Only through the prefix `ipc_` the method is available for a sender. If the sender tries to call a method, that does not start with the prefix  `ipc_`, an error is thrown from the `ipcjs` Library.__","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsg-systems%2Fipcjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsg-systems%2Fipcjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsg-systems%2Fipcjs/lists"}