Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function createShadowRootUi avoid render duplicated #359

Open
yunsii opened this issue Jan 19, 2024 · 2 comments
Open

Function createShadowRootUi avoid render duplicated #359

yunsii opened this issue Jan 19, 2024 · 2 comments
Labels
Milestone

Comments

@yunsii
Copy link
Contributor

yunsii commented Jan 19, 2024

Feature Request

If browser.scripting.executeScript all of extension script on chrome.runtime.OnInstalledReason.INSTALL or chrome.runtime.OnInstalledReason.UPDATE, we encounter this situation.

Is your feature request related to a bug?

N/A

What are the alternatives?

We have to wrap createShadowRootUi to check the name of the custom component used to host the ShadowRoot whether existed.

Additional context

N/A

@yunsii yunsii added the feature label Jan 19, 2024
@yunsii
Copy link
Contributor Author

yunsii commented Jan 19, 2024

After the problem is solved, I have to use global variable to control whether the ui is mounted, like window.__mountedNames. I think the implement should going on under the hood.

@aklinker1
Copy link
Collaborator

Interesting, the ContentScriptContext should be causing the UI to be removed if the install/update events are firing and when if it sees another version of the same script is being executed.

I'll double check this at some point, but it's a low priority rn since you have a work-around.

@aklinker1 aklinker1 added this to the v1.0 milestone Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants