{"id":39673694,"url":"https://github.com/addon-stack/browser","last_synced_at":"2026-04-18T01:02:54.201Z","repository":{"id":299891891,"uuid":"1004512039","full_name":"addon-stack/browser","owner":"addon-stack","description":"A TypeScript promise-based wrapper for Web Extension APIs, supporting both Manifest V2 and V3 across Chrome, Opera, Edge, and other Chromium-based browsers.","archived":false,"fork":false,"pushed_at":"2026-04-09T17:05:35.000Z","size":877,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-09T18:28:23.774Z","etag":null,"topics":["addon","api","chrome","chrome-extension","edge","firefox","opera","safari"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/addon-stack.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-18T18:34:19.000Z","updated_at":"2026-04-09T17:05:37.000Z","dependencies_parsed_at":"2025-06-18T21:21:46.369Z","dependency_job_id":"12fd6d8d-04a7-4d97-b09c-903d2de9357a","html_url":"https://github.com/addon-stack/browser","commit_stats":null,"previous_names":["addonbone/browser","addon-stack/browser"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/addon-stack/browser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addon-stack%2Fbrowser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addon-stack%2Fbrowser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addon-stack%2Fbrowser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addon-stack%2Fbrowser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/addon-stack","download_url":"https://codeload.github.com/addon-stack/browser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/addon-stack%2Fbrowser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31952208,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T00:39:45.007Z","status":"ssl_error","status_checked_at":"2026-04-18T00:39:20.671Z","response_time":62,"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":["addon","api","chrome","chrome-extension","edge","firefox","opera","safari"],"created_at":"2026-01-18T09:42:30.409Z","updated_at":"2026-04-18T01:02:54.173Z","avatar_url":"https://github.com/addon-stack.png","language":"TypeScript","readme":"# @addon-core/browser\n\nA TypeScript promise-based wrapper for Chrome Extension APIs, supporting both Manifest V2 and V3 across Chrome, Opera, Edge, and other Chromium-based browsers.\n\n[![npm version](https://img.shields.io/npm/v/%40addon-core%2Fbrowser.svg?logo=npm\u0026style=for-the-badge)](https://www.npmjs.com/package/@addon-core/browser)\n[![npm downloads](https://img.shields.io/npm/dm/%40addon-core%2Fbrowser.svg?style=for-the-badge\u0026color=blue)](https://www.npmjs.com/package/@addon-core/browser)\n[![CI](https://img.shields.io/github/actions/workflow/status/addon-stack/browser/ci.yml?style=for-the-badge)](https://github.com/addon-stack/browser/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=for-the-badge)](LICENSE.md)\n\n## Installation\n\n### npm\n\n```bash\nnpm i @addon-core/browser\n```\n\n### yarn\n\n```bash\nyarn add @addon-core/browser\n```\n\n### pnpm\n\n```bash\npnpm add @addon-core/browser\n```\n\n## Supported browsers\n\n- Google Chrome (MV2 \u0026 MV3)\n- Microsoft Edge (Chromium)\n- Opera (Chromium) — plus sidebar helpers\n- Other Chromium-based browsers (e.g., Brave, Vivaldi, Arc, Yandex, Chromium) — expected to work; behavior aligns with Chrome.\n- Firefox — partial support via compatible helpers (e.g., `sidebarAction`, `runtime.getBrowserInfo`)\n- Apple Safari — limited WebExtensions support; many Chromium-specific APIs are not available, so some helpers won’t work.\n\n## Supported Chrome APIs\n\n- [action](docs/action.md) — MV2/MV3 compatible; under the hood uses `chrome.action` (MV3) or `chrome.browserAction` (MV2) automatically.\n- [alarms](docs/alarms.md)\n- [audio](docs/audio.md)\n- [browsingData](docs/browsingData.md)\n- [commands](docs/commands.md)\n- [contextMenus](docs/contextMenus.md)\n- [cookies](docs/cookies.md)\n- [documentScan](docs/documentScan.md)\n- [downloads](docs/downloads.md)\n- [extension](docs/extension.md)\n- [history](docs/history.md)\n- [i18n](docs/i18n.md)\n- [idle](docs/idle.md)\n- [management](docs/management.md)\n- [notifications](docs/notifications.md)\n- [offscreen](docs/offscreen.md)\n- [permissions](docs/permissions.md)\n- [runtime](docs/runtime.md)\n- [scripting](docs/scripting.md)\n- [sidebar](docs/sidebar.md) — Unified helpers for Chrome Side Panel (MV3) and Firefox/Opera `sidebarAction`.\n- [storage](https://github.com/addon-stack/storage) — via separate package: [@addon-core/storage](https://www.npmjs.com/package/@addon-core/storage)\n- [tabCapture](docs/tabCapture.md)\n- [tabs](docs/tabs.md)\n- [userScripts](docs/userScripts.md)\n- [webNavigation](docs/webNavigation.md)\n- [webRequest](docs/webRequest.md)\n- [windows](docs/windows.md)\n\n## Why this package\n\n- Promise-based wrappers for callback-style Chrome APIs.\n- All event helpers return an unsubscribe function `() =\u003e void`.\n- Concise, consistent function names (easier to read and auto-complete).\n- Strong TypeScript types (based on `@types/chrome`) with explicit event parameter types.\n- Tree-shakable build (`sideEffects: false`) and small, focused utilities.\n- MV2/MV3 compatibility handled internally where applicable (e.g., Action, Tabs MV2 helpers, Sidebar cross-browser helpers).\n\n## Usage examples\n\n- setActionPopup (works in MV2 \u0026 MV3):\n\n```ts\nimport { setActionPopup } from \"@addon-core/browser\";\n\nawait setActionPopup(\"popup.html\");\n// Optional per-tab usage (when you have a tab id):\n// await setActionPopup(\"popup.html\", someTabId);\n```\n\n- getCurrentTab:\n\n```ts\nimport { getCurrentTab } from \"@addon-core/browser\";\n\nconst tab = await getCurrentTab();\nif (tab?.id) {\n  console.log(\"Current tab id:\", tab.id);\n}\n```\n\n- onTabUpdated (with unsubscribe):\n\n```ts\nimport { onTabUpdated } from \"@addon-core/browser\";\n\nconst off = onTabUpdated((tabId, changeInfo, tab) =\u003e {\n  if (changeInfo.status === \"complete\") {\n    console.log(\"Tab finished loading:\", tabId, tab.url);\n  }\n});\n\n// Later, to stop listening:\noff();\n```\n\n## Utilities\n\nIn addition to Chrome API wrappers, this package provides a set of low-level utilities for error handling, promise management, and listener safety. While these are primarily used internally, they are also exported via the `@addon-core/browser/utils` subpath for advanced usage.\n\nFor a complete list of utility functions and examples, see the [Utilities Documentation](docs/utils.md).\n\n\n## Not yet covered\n\nThese commonly used WebExtensions/Chrome Extension APIs are not wrapped here yet (Chrome OS–only APIs are intentionally omitted). If you’d like to contribute, please see [CONTRIBUTING.md](CONTRIBUTING.md) and open an issue/PR.\n\n- bookmarks\n- contentSettings\n- declarativeContent\n- declarativeNetRequest (and declarativeNetRequestFeedback)\n- desktopCapture\n- devtools.* (inspectedWindow, network, panels)\n- dns\n- fontSettings\n- identity\n- identityProvider\n- omnibox\n- pageCapture\n- platformKeys\n- power\n- privacy\n- proxy\n- search\n- sessions\n- system.cpu\n- system.memory\n- system.storage\n- tabGroups\n- topSites\n- tts\n- ttsEngine","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddon-stack%2Fbrowser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faddon-stack%2Fbrowser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faddon-stack%2Fbrowser/lists"}