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

Use browser.runtime.connect refactor xhr api #336

Closed
ACTCD opened this issue Sep 28, 2022 · 0 comments
Closed

Use browser.runtime.connect refactor xhr api #336

ACTCD opened this issue Sep 28, 2022 · 0 comments
Labels
maintenance Chores and refactoring

Comments

@ACTCD
Copy link
Collaborator

ACTCD commented Sep 28, 2022

We could use browser.runtime.connect instead of browser.runtime.sendMessage to complete message delivery in xhr api.

The advantage of browser.runtime.connect is that it can maintain a long-lived connection between the object instance of the content scripts function and object instance of the background function. Since the message channel of the custom port name is exclusive, we no longer have to distinguish the source of the message, and the background will no longer need the xhrs global variable, all messages will be passed directly from object to object.

Ref: #315

@ACTCD ACTCD changed the title Use browser.runtime.connect build xhr api Use browser.runtime.connect refactor xhr api Sep 28, 2022
@quoid quoid added javascript maintenance Chores and refactoring labels Sep 28, 2022
quoid added a commit that referenced this issue Oct 6, 2022
Co-authored-by: ACTCD <101378590+ACTCD@users.noreply.github.com>
@quoid quoid closed this as completed Oct 11, 2022
@ACTCD ACTCD added this to Tasks Aug 19, 2024
@ACTCD ACTCD moved this to Release in Tasks Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Chores and refactoring
Projects
Status: Release
Development

No branches or pull requests

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy