Share via

Edge extension side panel populating same data to all tabs

Anonymous
2024-04-02T07:40:23+00:00

I have created edge extension with side panel to show tab specific data but same data getting reflected to all the tabs containing side panel.

Expected : Side panel should show tab specific data.

Example: I have created Sample Extension that displays URL of the page in side panel.

Issue: Seeing same URL in all the tabs side panel.

Expected Samples:

Code samples

Steps, I followed to implement side panel follows below,

Step 1: "permissions": ["sidePanel", "tabs"]

Step 2: Allows users to open the side panel by clicking on the action toolbar icon


chrome.sidePanel 

  .setPanelBehavior({ openPanelOnActionClick: true }) 

  .catch((error) => console.error(error)); 

chrome.tabs.onUpdated.addListener(async (tabId, info, tab) => { 

  if (!tab.url) return; 

  const url = new URL(tab.url); 

  await chrome.sidePanel.setOptions({ 

    tabId, 

    path: 'sidepanel.html', 

    enabled: true 

  }); 

}); 

Microsoft Edge | Browser extensions | Windows 11

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

3 answers

Sort by: Most helpful
  1. Anonymous
    2024-04-04T04:26:38+00:00

    You are welcome and have a good day.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2024-04-04T03:51:50+00:00

    Thanks, Paul.

    Regards,

    Vignesh

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2024-04-02T10:18:52+00:00

    Good day Dev_Vignesh! I would suggest to post this query to our neighbor forum from the links below as this is best suited in there. They are more oriented on with regards to this type queries/issues and there will be IT Pros and Gurus and the likes for extensions who has the same deployment or setup in this type of environment and are available that will be able to fulfill your query out there.

    https://learn.microsoft.com/en-us/answers/ask

    https://github.com/microsoft/MicrosoftEdge-Exte...

    ___________________________________________________________

    Note: This is a non-Microsoft website. The page appears to be providing accurate, safe information. Watch out for ads on the site that may advertise products frequently classified as a PUP (Potentially Unwanted Products). Thoroughly research any product advertised on the site before you decide to download and install it.

    ___________________________________________________________

    Regards,

    Paul R.

    Was this answer helpful?

    0 comments No comments