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

experiment with a public stable browser API that extensions can use #16294

Merged
merged 15 commits into from
Oct 31, 2024

Conversation

ornicar
Copy link
Collaborator

@ornicar ornicar commented Oct 30, 2024

IDK yet what it will look like, just trying things out

IDK yet what it will look like, just trying things out
@Siderite
Copy link

I think calling it api is confusing. Maybe something more descriptive like eventHub or something.

@ornicar
Copy link
Collaborator Author

ornicar commented Oct 30, 2024

here it would be accessed as window.api.pubsub, leaving room for more than just pubsub under the api package.

But yeah api.eventHub or api.events would work too.

@Siderite
Copy link

You added it to site, not window. I get what you want, but API is too generic. Maybe something else.

@schlawg
Copy link
Collaborator

schlawg commented Oct 30, 2024

if a goal is to steer people away from window.site, window.<whatever> seems better than window.site.<whatever>.

@schlawg
Copy link
Collaborator

schlawg commented Oct 30, 2024

another option is window.public - the container object for everything (save site.analysis) that siderite is sanctioned to abuse

@schlawg
Copy link
Collaborator

schlawg commented Oct 30, 2024

window.api is fine too. it's not like an extension should be confused about where api comes from

@ornicar ornicar marked this pull request as ready for review October 31, 2024 11:40
@ornicar ornicar merged commit 8473c1f into master Oct 31, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants