{"id":19643337,"url":"https://github.com/sorenlouv/frametalk","last_synced_at":"2026-03-14T07:38:01.169Z","repository":{"id":46933973,"uuid":"85119497","full_name":"sorenlouv/frametalk","owner":"sorenlouv","description":"Simple postMessage wrapper to make cross-frame communication easy as pie. Supports promises and return values. (No dependencies)","archived":false,"fork":false,"pushed_at":"2022-12-09T08:14:59.000Z","size":253,"stargazers_count":11,"open_issues_count":11,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T09:03:15.803Z","etag":null,"topics":["browser","communication","iframe","postmessage","promise"],"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/sorenlouv.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":"2017-03-15T20:49:15.000Z","updated_at":"2023-10-17T13:45:45.000Z","dependencies_parsed_at":"2023-01-25T19:31:54.893Z","dependency_job_id":null,"html_url":"https://github.com/sorenlouv/frametalk","commit_stats":null,"previous_names":["sorenlouv/frametalk","sqren/frametalk"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorenlouv%2Fframetalk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorenlouv%2Fframetalk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorenlouv%2Fframetalk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sorenlouv%2Fframetalk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sorenlouv","download_url":"https://codeload.github.com/sorenlouv/frametalk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251319747,"owners_count":21570450,"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":["browser","communication","iframe","postmessage","promise"],"created_at":"2024-11-11T14:20:45.963Z","updated_at":"2026-03-14T07:38:01.103Z","avatar_url":"https://github.com/sorenlouv.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Install\n```\n$ npm install --save frametalk\n```\n\n## One way usage\nSend a message to another frame.\n\n```js\nconst frametalk = require('frametalk');\n\n// Frame A: send a message to frame B\nframetalk.send(frameB, 'hello', {foo: 'bar'});\n\n// Frame B: receive message from frame A\nframetalk.on('hello', (event, data) =\u003e {\n  console.log(data); // output: {foo: 'bar'}\n});\n```\n\n## Two way usage\nSend a message to another frame and get a response back\n\n```js\nconst frametalk = require('frametalk');\n\n// Frame A: send request to frame B, and await reply\nframetalk.request(frameB, 'getStatus')\n  .then((res) =\u003e {\n    console.log(res); // output: {status: 'OK'}\n  });\n\n// Frame B: receive message from frame A, and send reply back\nframetalk.replyOn('getStatus', (event) =\u003e {\n  return {status: 'OK'};\n});\n```\n\nYou can also respond with a promise:\n```js\nframetalk.replyOn('getStatus', (event) =\u003e {\n  return new Promise((resolve) =\u003e {\n    setTimeout(() =\u003e {\n      resolve({status: 'Still OK'});\n    }, 1000);\n  })\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsorenlouv%2Fframetalk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsorenlouv%2Fframetalk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsorenlouv%2Fframetalk/lists"}