{"id":18937361,"url":"https://github.com/fetch/frame-bridge","last_synced_at":"2025-06-14T21:38:26.292Z","repository":{"id":27830990,"uuid":"31320876","full_name":"fetch/frame-bridge","owner":"fetch","description":"Minimal JS frame bridge, using window.postMessage","archived":false,"fork":false,"pushed_at":"2016-02-25T11:11:35.000Z","size":4,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-02-14T07:06:27.959Z","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/fetch.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":"2015-02-25T15:42:57.000Z","updated_at":"2020-02-06T13:52:39.000Z","dependencies_parsed_at":"2022-08-01T11:17:22.292Z","dependency_job_id":null,"html_url":"https://github.com/fetch/frame-bridge","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetch%2Fframe-bridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetch%2Fframe-bridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetch%2Fframe-bridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fetch%2Fframe-bridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fetch","download_url":"https://codeload.github.com/fetch/frame-bridge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239937699,"owners_count":19721483,"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-08T12:10:53.008Z","updated_at":"2025-02-21T00:52:08.656Z","avatar_url":"https://github.com/fetch.png","language":"JavaScript","readme":"# FrameBridge JS\n\nMinimal frame bridge, using `window.postMessage`.\n\nTo communicate between two frames you simply instantiate an instance of `FrameBridge` in both parent and child.\n\nTake for example the following parent page:\n\n```html\n\u003ciframe id=\"child-page\" width=\"100%\" height=\"500\"\u003e\u003c/iframe\u003e\n\n\u003cscript\u003e\nvar frame = document.getElementById('child-page');\nvar bridge = new FrameBridge({target: frame});\n\nbridge.on('setFrameHeight', function(height){\n  frame.height = height;\n});\n\u003c/script\u003e\n```\n\nWith a child page like this:\n\n```html\n\u003cdiv class=\"container\"\u003e....\u003c/div\u003e\n\n\u003cscript\u003e\nvar bridge = new FrameBridge();\nwindow.onload = function(){\n  bridge.trigger('setFrameHeight', document.body.clientHeight);\n};\n\u003c/script\u003e\n```\n\nThis would resize the frame in the parent window to match the actual size of the content.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffetch%2Fframe-bridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffetch%2Fframe-bridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffetch%2Fframe-bridge/lists"}