Commit graph

3 commits

Author SHA1 Message Date
Sam Atkins
bc0ef5f69d LibWeb: Implement CSS.supports(string) function :^)
Websites being able to query whether we support a given CSS feature
should prevent them from loading unnecessary polyfills for things we
already support! Or at least, that's the nice theory. :^)
2021-10-08 23:02:57 +02:00
Sam Atkins
2b67f87629 LibWeb: Implement 2-argument version of CSS.supports()
This version takes a property name and value as separate parameters.
2021-10-08 23:02:57 +02:00
Sam Atkins
575ce04148 LibWeb: Add CSS.escape() JS function
This is the `CSS` namespace defined in IDL here:
https://www.w3.org/TR/cssom-1/#namespacedef-css , not to be confused
with our `Web::CSS` namespace. Words are hard.

`CSS.escape()` lets you escape identifiers that can then be used to
create a CSS string.

I've also stubbed out the `CSS.supports()` function.
2021-10-08 23:02:57 +02:00