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 same enum for or all include or exclude enums? #278

Open
beaufortfrancois opened this issue Sep 1, 2023 · 2 comments
Open

Use same enum for or all include or exclude enums? #278

beaufortfrancois opened this issue Sep 1, 2023 · 2 comments

Comments

@beaufortfrancois
Copy link
Contributor

May I suggest we add a single enum for "include", "exclude" (not web exposed) and use it where needed?

Before:

enum SelfCapturePreferenceEnum {
  "include",
  "exclude"
};
enum SystemAudioPreferenceEnum {
  "include",
  "exclude"
};
enum SurfaceSwitchingPreferenceEnum {
  "include",
  "exclude"
};
enum MonitorTypeSurfacesEnum {
  "include",
  "exclude"
};

After:

enum DisplayMediaIncludeOrExclude { "include", "exclude" };

typedef DisplayMediaIncludeOrExclude SystemAudioPreferenceEnum;
typedef DisplayMediaIncludeOrExclude SelfCapturePreferenceEnum;
typedef DisplayMediaIncludeOrExclude SurfaceSwitchingPreferenceEnum;
typedef DisplayMediaIncludeOrExclude MonitorTypeSurfacesEnum;
@eladalon1983
Copy link
Member

If it's not Web-exposed, could it be used in the IDL files of UA implementations without being reflected by a spec change, perhaps?

@beaufortfrancois
Copy link
Contributor Author

@jan-ivar @youennf What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants