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

Add detection for WebMidi and Window Placement APIs #162

Merged
merged 2 commits into from
Jul 10, 2023

Conversation

muodov
Copy link
Member

@muodov muodov commented Jul 3, 2023


@muodov muodov requested a review from kdzwinel July 3, 2023 10:50
Copy link
Member

@kdzwinel kdzwinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Max! Left you some quesitons.

{
id: 'window-placement-api',
run: () => {
return ('screen' in window && 'isExtended' in window.screen);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this the multi-screen windows API? Google folks are using a different detection technique:

  "'Multi-Screen Window Placement': {regEx: /getScreenDetails\\s*\\(\\)/g, where: 'JavaScript', supported: (async () =\u003e 'getScreenDetails' in self)(), featureDetection: `(async () =\u003e 'getScreenDetails' in self)()`, documentation: 'https://developer.chrome.com/articles/multi-screen-window-placement/', blinkFeatureID: 3388},"

Not sure if that's better?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both getScreenDetails and isExtended are introduced in the spec, so I guess it doesn't really matter?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I guess their goal is to check if feature is available FULLY. We may not care about that, for us if feature is available even partially it's alrady bad.

server.js Show resolved Hide resolved
Copy link
Member

@kdzwinel kdzwinel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@kdzwinel kdzwinel merged commit 65341bf into main Jul 10, 2023
@kdzwinel kdzwinel deleted the muodov/harmful-api-tests branch July 10, 2023 16:12
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.

2 participants