This example demonstrates using chrome.sidePanel.open()
to open a global side panel through a context menu click and a tab-specific side panel by clicking a button in an extension page or a button click injected by a content script. This feature will be available starting Chrome 116.
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Navigate to any page, like example.com.
- Right-click on any word.
- Choose the context menu "Open side panel".
- The extension page will open when you install the extension.
- Click on the "Open side panel" button.
- Navigate to google.com.
- Scroll to the very bottom of the page.
- Click on the "Open side panel" button.