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

Web platform integration #95

Open
domenic opened this issue Mar 27, 2023 · 1 comment
Open

Web platform integration #95

domenic opened this issue Mar 27, 2023 · 1 comment

Comments

@domenic
Copy link
Member

domenic commented Mar 27, 2023

Should all setlikes get these methods? If so, we need to update Web IDL.

It's not clear that they should... but we should think through the known cases.

@bakkot
Copy link
Collaborator

bakkot commented Mar 27, 2023

Off the cuff thoughts:

  • FontFaceSet/FontFaceVariations: I could see wanting to intersect this with a JS Set, but it's hard to imagine having two of them you want to intersect (or whatever) with each other
  • GPUSupportedFeatures: ditto
  • CustomStateSet: ditto
  • XRAnchorSet: I could potentially see wanting to intersect two of these, I guess?
  • css Highlight: this one you might want to use any of this proposal's new Set-producing methods with

The isSubsetOf and isSupersetOf methods seem like you might want them on all of these, though mostly to interact with JS Sets, and you can always do js.isSubsetOf(web) instead of web.isSupersetOf(js).


Honestly these seem sufficiently obscure that I expect the new Set methods, were they added, would see approximately zero use. What use cases there are can mostly (but not entirely) be met by using a built-in Set and passing the setlike as an argument (which we did ultimately decide should be supported - you can't .call these on non-builtin Sets, but you can pass non-builtin setlikes as arguments).

So personally I wouldn't bother adding them, at least not in advance of a request from developers.

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