{"id":16641856,"url":"https://github.com/samthor/iframe-load","last_synced_at":"2025-06-16T20:36:54.814Z","repository":{"id":66115177,"uuid":"224366513","full_name":"samthor/iframe-load","owner":"samthor","description":"Swappable iframe loader","archived":false,"fork":false,"pushed_at":"2020-12-08T11:13:09.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-18T15:52:54.612Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://npmjs.com/iframe-load","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samthor.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":"2019-11-27T07:04:32.000Z","updated_at":"2020-12-08T11:13:12.000Z","dependencies_parsed_at":"2023-02-20T19:31:00.159Z","dependency_job_id":null,"html_url":"https://github.com/samthor/iframe-load","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fiframe-load","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fiframe-load/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fiframe-load/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samthor%2Fiframe-load/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samthor","download_url":"https://codeload.github.com/samthor/iframe-load/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243164986,"owners_count":20246718,"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-10-12T07:48:06.052Z","updated_at":"2025-03-12T05:28:47.724Z","avatar_url":"https://github.com/samthor.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Swappable iframe loader, inspired by [Santa Tracker](https://santatracker.google.com) 🎅\n\nProvides a JS class which loads and can swap between hosted iframes.\nThis is useful for sites which are \"hosts\" for games or other experiences (which can be useful to isolate parts of your site).\n\n# Usage\n\n```js\nimport {Loader, LoaderHandler} from 'iframe-load';\n\nconst handler = new (class extends LoaderHandler {\n  // optional callbacks here, see main.js\n});\n\nconst container = document.body;  // or somewhere in DOM to place \u003ciframe\u003e\nconst loader = new Loader(container, handler);\n\n\nloader.load('./page.html', context).then((result) =\u003e {\n  if (result === undefined) {\n    // was preempted by some other load\n  } else {\n    // otherwise, the iframe's load event was called (or the frame failed to load)\n  }\n});\n```\n\nBy default, the loader sets `tabindex=\"-1\"` and a style of `pointer-events: none` on any frame while it is disabled.\nThis can be overridden (along with other helpers) by subclassing `Loader` and changing its static helpers.\n\n## Advanced\n\nThe created loader can have its `.disabled` property set to disable user interaction with its frames.\nIt also has method `.focus()` and property `.hasFocus`.\n\n# TODO\n\nThis readme is fairly sparse.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Fiframe-load","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamthor%2Fiframe-load","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamthor%2Fiframe-load/lists"}