On 4/11/22 15:02, Anders Hartvoll Ruud wrote:
Ah, I'm not familiar with that way of doing compat research. What would
we gain from doing that vs. regular use-counter + HTTP Archive?
Do we expect those 0.1% to visibly break? (I guess that depends on
what they're feature testing for..)
I would not expect that at all based on the HTTP Archive query. If
testing against "not all" was commonplace, I'd expect more results
beyond the two Yandex scripts. Or, perhaps it is commonplace, but it
happens mostly on features that actually *are* supported at the moment.
Just as an example (and to show that "not all" testing isn't a myth),
one of the few (non-Yandex-script) sites that did show up was
https://ww.sapo.pt <https://ww.sapo.pt>, which does the following:
if(rule.mediaText.includes("not all") || ...)
By the looks of it, it's an early-out related to the theme switching,
which prevents the code from amending the query if prefers-color-scheme
is not supported. Had we not supported prefers-color-scheme, then I
think the worst that could happen is that we end up with a more
complicated query that still ultimately evaluates to false. Testing the
page with the feature enabled (with and without dark mode preference),
their color switcher still works normally.
That is just one site though, it's probably theoretically possible to
write *something* that breaks. I did try to look at the "sample URLs"
for the counters, but I couldn't actually reproduce the counters being hit.
It's a thing that even Google DevRel people have recommended in the
past, ftr :)
https://web.dev/prefers-color-scheme/#supporting-dark-mode
But if you have data to indicate this is not a problem in the wild I'd
be happy to implement it in Gecko after you ship this change.
Cheers,
-- Emilio
--
You received this message because you are subscribed to the Google Groups
"blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to blink-dev+unsubscr...@chromium.org.
To view this discussion on the web visit
https://groups.google.com/a/chromium.org/d/msgid/blink-dev/2b4b966a-a842-39a4-34f1-dcad87ca1360%40mozilla.com.