{"id":20693990,"url":"https://github.com/cristianoliveira/ifrone","last_synced_at":"2025-08-01T20:36:12.722Z","repository":{"id":143019132,"uuid":"291314819","full_name":"cristianoliveira/ifrone","owner":"cristianoliveira","description":"A tiny wrapper around cross-window communication.","archived":false,"fork":false,"pushed_at":"2020-10-08T15:59:25.000Z","size":154,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-11T02:26:34.994Z","etag":null,"topics":["iframe","iframe-communication","iframe-pubsub","lightweight","pubsub","wrapper"],"latest_commit_sha":null,"homepage":"","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/cristianoliveira.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":"2020-08-29T17:13:08.000Z","updated_at":"2023-03-08T03:27:42.000Z","dependencies_parsed_at":"2023-05-21T19:15:13.937Z","dependency_job_id":null,"html_url":"https://github.com/cristianoliveira/ifrone","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cristianoliveira/ifrone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Fifrone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Fifrone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Fifrone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Fifrone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cristianoliveira","download_url":"https://codeload.github.com/cristianoliveira/ifrone/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Fifrone/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268292027,"owners_count":24227054,"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","status":"online","status_checked_at":"2025-08-01T02:00:08.611Z","response_time":67,"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":["iframe","iframe-communication","iframe-pubsub","lightweight","pubsub","wrapper"],"created_at":"2024-11-16T23:41:55.475Z","updated_at":"2025-08-01T20:36:12.675Z","avatar_url":"https://github.com/cristianoliveira.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ifrone. \n[![NPM](https://img.shields.io/npm/v/ifrone.svg)](https://www.npmjs.com/package/ifrone)\n\nA tiny wrapper around cross-window communication.\n\nThis feature is normally used for communication between a page host and an iframe.\n\n## Example\n\n```javascript\n  \u003cbody\u003e\n    \u003ciframe id=\"myiframe\" src=\"./iframe.html\" frameborder=\"0\"\u003e\u003c/iframe\u003e\n    \u003cscript src=\"./ifrone.js\"\u003e\u003c/script\u003e\n    \u003cscript charset=\"utf-8\"\u003e\n      const iframe = document.getElementById('myiframe');\n      var iph = ifrone.connect({\n        from: window,\n        to: iframe.contentWindow,\n        host: '*'\n      })\n\n      iph.on('myIframeEvent', (event) =\u003e {\n        console.log('myIframeEvent', event);\n      })\n\n      setInterval(() =\u003e {\n        iph.send('myHostEvent', 'fooo')\n      }, 1000)\n\n      iph.ack('myHostEvent', (event) =\u003e {\n        console.log('on ack myHostEvent', event);\n      })\n\n    \u003c/script\u003e\n  \u003c/body\u003e\n```\n\n## Running tests\n\n```\nyarn test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristianoliveira%2Fifrone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristianoliveira%2Fifrone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristianoliveira%2Fifrone/lists"}