{"id":43926953,"url":"https://github.com/cristiantela/iframessa","last_synced_at":"2026-02-06T23:08:50.711Z","repository":{"id":43107540,"uuid":"422050284","full_name":"cristiantela/iframessa","owner":"cristiantela","description":"Communicate between iframes and application","archived":false,"fork":false,"pushed_at":"2023-03-23T03:12:02.000Z","size":15,"stargazers_count":15,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-30T02:18:15.743Z","etag":null,"topics":["communication-with-iframe","iframes","micro-frontend","postmessage"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/iframessa","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/cristiantela.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":"2021-10-28T03:20:47.000Z","updated_at":"2024-05-17T14:13:16.000Z","dependencies_parsed_at":"2022-08-30T12:40:43.799Z","dependency_job_id":null,"html_url":"https://github.com/cristiantela/iframessa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cristiantela/iframessa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristiantela%2Fiframessa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristiantela%2Fiframessa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristiantela%2Fiframessa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristiantela%2Fiframessa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cristiantela","download_url":"https://codeload.github.com/cristiantela/iframessa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristiantela%2Fiframessa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29179640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T22:12:24.066Z","status":"ssl_error","status_checked_at":"2026-02-06T22:12:09.859Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["communication-with-iframe","iframes","micro-frontend","postmessage"],"created_at":"2026-02-06T23:08:50.648Z","updated_at":"2026-02-06T23:08:50.703Z","avatar_url":"https://github.com/cristiantela.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# iframessa\n\nPackage to communicate between iframes and application.\n\n## Install\n\n```\nnpm install iframessa\n```\n\n## Usage examples\n\n### Case 1: You would like to receive the logged user name from your web application into your iframe.\n\n#### 1. Create a getter on your parent window\n\n```html\n\u003ciframe src=\"about.html\" name=\"about\"\u003e\u003c/iframe\u003e\n```\n\n```javascript\nconst iframessa = require('iframessa');\n\niframessa.getter('userName', ({ data, sender }) =\u003e {\n  return 'Matheus Cristian';\n});\n```\n\n#### 2. Call the getter on your child window\n\n```javascript\nconst iframessa = require('iframessa');\n\niframessa.register('about');\n\niframessa.get('userName').then(({ data, sender }) =\u003e {\n  console.log(data); // Matheus Cristian\n  console.log(sender); // parent object\n}, data);\n```\n\n### Case 2: You would like to emit an event with a data from your child window to your parent\n\n#### 1. Emit a message to your parent window from your iframe\n\n```javascript\nconst iframessa = require('iframessa');\n\niframessa.emit('action', 'logout');\n```\n\nThis will emit a `'action'` event to your parent with the data `'logout'`.\nNote that the data can be an object as well.\n\n#### 2. Make your parent watch the `'action'` event\n\n```javascript\nconst iframessa = require('iframessa');\n\niframessa.on('action', ({ data, sender }) =\u003e {\n  console.log(data); // logout\n});\n```\n\nYou can emit something to a specific child window with `iframessa.modules.about.emit(event, data);`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristiantela%2Fiframessa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristiantela%2Fiframessa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristiantela%2Fiframessa/lists"}