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

"Tab" isn't perhaps the best spec language? #4

Open
slightlyoff opened this issue Jul 28, 2021 · 3 comments
Open

"Tab" isn't perhaps the best spec language? #4

slightlyoff opened this issue Jul 28, 2021 · 3 comments

Comments

@slightlyoff
Copy link

While I understand the goal of using tab in the name of the API vs. document, it might be worth considering some more generalised alternatives that can work in non-tab scenarios (e.g. PWAs). A few that come to mind:

  • preferCurrentContext
  • preferCurrentWindow
  • preferCurrentFrame (perhaps most accurate)

Thoughts?

@eladalon1983
Copy link
Collaborator

Agreed that tab has some problems. The issue has come up a few times, but a better alternative has not yet been found. I'm happy to continue the search and try to find something everybody is happy with.

  • preferCurrentWindow - I'm concerned about the ambiguity - unclear to Web-developers whether it refers to window or to the browser window in which the tab is loaded.
  • preferCurrentFrame - I agree with your assessment of the accuracy. I'm concerned it would become even more misleading when/if additional APIs are introduced, some of which are already under discussion (iframe.getViewportMedia and element-level capture).
  • preferCurrentContext - might be unclear how narrowly/widely "context" is meant - the browsing context or the current iframe. Or wdyt?
  • preferCurrentBrowsingContext - my own attempt to clarify your suggestion of preferCurrentContext. But the previous API shape, getCurrentBrowsingContextMedia(), raised a lot of complaints over the length of the name, so we should probably avoid this.

I think preferCurrentTab is the lesser evil here. The name has passed muster for @foolip, @alvestrand, @guidou and @yoavweiss. Wdyt? Can you think of something better that could reach similar consensus? If so, I'd be happy to adopt.

@eladalon1983
Copy link
Collaborator

I've also consulted @alvestrand today and my understanding is that he'd be OK with either preferCurrentTab or preferCurrentBrowsingContext. Unless you feel strongly against "tab," I'd like to proceed with this name (preferCurrentTab).

@eladalon1983
Copy link
Collaborator

@slightlyoff, I'm thinking of closing this issue. This knob shipped in m94 and the benefits of renaming do not seem to merit the work it would take. (Also, we don't yet have a name everyone likes better than preferCurrentTab.) Wdyt?

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

No branches or pull requests

2 participants