{"id":16440325,"url":"https://github.com/constgen/cross-channel","last_synced_at":"2026-06-25T08:31:34.916Z","repository":{"id":149679986,"uuid":"58498182","full_name":"constgen/cross-channel","owner":"constgen","description":"Cross origin messaging channel","archived":false,"fork":false,"pushed_at":"2017-10-23T22:02:53.000Z","size":222,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-10T20:31:13.449Z","etag":null,"topics":["ipc"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/constgen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-10T22:48:43.000Z","updated_at":"2017-08-31T00:00:13.000Z","dependencies_parsed_at":"2023-09-29T07:04:32.743Z","dependency_job_id":null,"html_url":"https://github.com/constgen/cross-channel","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/constgen/cross-channel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constgen%2Fcross-channel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constgen%2Fcross-channel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constgen%2Fcross-channel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constgen%2Fcross-channel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/constgen","download_url":"https://codeload.github.com/constgen/cross-channel/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/constgen%2Fcross-channel/sbom","scorecard":{"id":303176,"data":{"date":"2025-08-11","repo":{"name":"github.com/constgen/cross-channel","commit":"0dc0f57827aca6496721d6e20bd1b9d87e9c8fbe"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-17T21:17:13.649Z","repository_id":149679986,"created_at":"2025-08-17T21:17:13.649Z","updated_at":"2025-08-17T21:17:13.649Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34767542,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-25T02:00:05.521Z","response_time":101,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["ipc"],"created_at":"2024-10-11T09:11:49.469Z","updated_at":"2026-06-25T08:31:34.503Z","avatar_url":"https://github.com/constgen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CrossChannel\n\nCross origin messaging channel. Sends messages between different JavaScript contexts.\n\n## Installation\n\nIn a **Browser** environment:\n\n```html\n\u003cscript src=\"path/to/connexionjs/dist/cross-channel.min.js\"\u003e\u003c/script\u003e\n\u003cscript\u003e\n\tvar channel = new CrossChannel('name')\n\tchannel.on('message', handler)\n\tchannel.postMessage(message)\n\u003c/script\u003e\n```\n\nIn a **CommonJS** environment first install it from NPM:\n\n```\n$ npm install cross-channel\n```\n\nthen in the source code use\n\n```js\nvar CrossChannel = require('cross-channel')\nvar channel = new CrossChannel('name')\nchannel.on('message', handler)\nchannel.postMessage(message)\n```\n\n## Reference\n\n### `channel.name: String`\n\nThe name of a channel\n\n### `channel.postMessage(message: Object)`\n\nSends a message to all other channel instances with the same name. Message can't be a DOM element or contain a DOM element. The message is cloned between different execution contexts.\n\n### `channel.on('message', handler: Function)`\n\nAttaches listener to a 'message' event. The handler is called only when message is sent from another instances with the same channel name, but not called when `postmessage()` is called on the same instance. The callback is executed with a single argument of MessageEvent object. The **event** interface:\n\n```\nMessageEvent {\n\ttype: String\n\tdata: Object|Boolean|String|Number|Null|Undefined\n\ttimeStamp: Number\n\torigin: String\n\tsourceChannel: String\n}\n```\n\n### `channel.once('message', handler: Function)`\n\nAttaches listener that is executed only once for the very first 'message' event.\n\n### `channel.addEventListener('message', handler: Function)`\n\nThe alias to `channel.on()`. Necessary for a compatibility with **BroadcastChannel API** when used as a polifyll.\n\n### `channel.removeEventListener('message', handler: Function)`\n\nRemoves an event handler of a 'message' event.\n\n### `channel.removeAllListeners('message')`\n\nRemoves all event handlers of a 'message' event.\n\n### `channel.close()`\n\nRemoves all channel event handlers and closes a channel to reveal memory.\n\n## Examle\n\n```js\nvar channelGreen1 = new CrossChannel('green')\nvar channelGreen2 = new CrossChannel('green')\n\nchannelGreen1.postMessage({text: 'message'})\nchannelGreen2.on('message', function(event){\n\tconsole.log(event.data) // -\u003e {text: 'message'}\n})\n```\n\n## Use cases:\n- need a **BroadcastChannel** polifyll;\n- developement of a multiple screen expirience in a browser;\n- development of a JavaScript API for media players that are embedded in an `\u003ciframe\u003e`;\n- need an unified messaging channel in browser extensions;\n- messaging between all frames with any origins in a browser window;\n- messaging between all windows/frames and background processes on NWJS platform;\n- messaging between \"Node\" and \"Webkit\" context on the Node-webkit platform;\n- messaging across tabs of the same origin\n\u003c!--- messaging between different main process and child processes in NodeJS--\u003e\n\n## Compatibility\n\u003c!-- http://www.tablesgenerator.com/markdown_tables --\u003e\n### Browsers\n| Browsers             |  self  | frames  | tabs |\n|----------------------|:------:|:-------:|:----:|\n| Firefox              |    ✓   |   ✓    |   ✓  |\n| Android Firefox      |    ✓   |   ✓    |   ✓  |\n| Chrome               |    ✓   |   ✓    |   ✓  |\n| Android Chrome       |    ✓   |   ✓    |   ✓  |\n| Opera \u003c=9            |    -   |   -     |   -  |\n| Opera \u003c=12           |    ✓   |   ✓    |   ✓  |\n| Opera \u003e=15           |    ✓   |   ✓    |   ✓  |\n| Android Opera \u003e=15   |    ✓   |   ✓    |   ✓  |\n| Opera mini           |    ✓   |   ✓    |   ✓  |\n| Safari \u003e=5           |    ✓   |   ✓    |   ✓  |\n| Safari on iOS \u003e= 8   |    ✓   |   ✓    |   ✓  |\n\u003c!--| Chrome on iOS        |    ✓   |   ✓    |   -  |--\u003e\n\u003c!--| Firefox on iOS       |    ✓   |   ✓    |   -  |--\u003e\n| Android Browser \u003e=4.1|    ✓   |   ✓    |   ✓  |\n\u003c!--| IE \u003c=8               |    -   |   -     |   -  |--\u003e\n| IE \u003e=9               |    ✓   |   ✓    |  ~   |\n| Mobile IE \u003e=10       |    ✓   |   ✓    |   -  |\n| Edge                 |    ✓   |   ✓    |   ✓  |\n| Worker               |        |         |      |\n\n### Extensions\n| Browsers             |  self  | background  | content | popup | options |\n|----------------------|:------:|:-----------:|:-------:|:-----:|:-------:|\n| Chrome extension     |    ✓   |      ✓     |    ✓    |   ✓   |    ✓   |\n| Firefox WebExtension |    ✓   |      ✓     |    ✓    |   ✓   |    ✓   |\n| Edge WebExtension    |        |             |         |       |         |\n| Safari extension     |    -   |      -      |    -    |   -   |    -    |\n\n### Applications\n| Platforms            |  self  | frames | tabs | webview | background | NodeJS |\n|----------------------|:------:|:------:|:----:|:-------:|:----------:|:------:| \n| Node-webkit \u003c=0.11   |    ✓   |   ✓    |   -  |    o    |     o     |   ✓    |\n| NWJS \u003e=0.13          |    ✓   |   ✓    |   ✓  |         |     ✓     |   -    |\n| Electron             |        |        |      |         |            |        |\n| Chrome app           |        |        |      |         |            |        |\n| Windows Universal app|        |        |      |         |            |        |\n| Cordova              |        |        |      |         |            |        |\n| Firefox OS app       |        |        |      |         |            |        |\n\n### Server side\n| Platforms            |  self  | children | parallel | forks |\n|----------------------|:------:|:--------:|:--------:|:-----:|\n| NodeJS               |    -   |     -    |     -    |   -   |\n\n\u003c!--## Polyfills that may be required for old platforms:\n- Object.create() (IE \u003c=8, FF \u003c=3.6, SF \u003c5, iOS \u003c=5.1, CH \u003c6, OP \u003c=11.50)--\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconstgen%2Fcross-channel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fconstgen%2Fcross-channel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fconstgen%2Fcross-channel/lists"}