/* * Copyright (c) 2021-2025, Sam Atkins * Copyright (c) 2023, Tim Flynn * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include #include #include #include #include #include // https://www.w3.org/TR/cssom-1/#namespacedef-css namespace Web::CSS { struct PropertyDefinition { String name; String syntax; bool inherits; Optional initial_value; }; WEB_API WebIDL::ExceptionOr escape(JS::VM&, StringView identifier); WEB_API bool supports(JS::VM&, FlyString const& property, StringView value); WEB_API WebIDL::ExceptionOr supports(JS::VM&, StringView condition_text); WEB_API WebIDL::ExceptionOr register_property(JS::VM&, PropertyDefinition definition); // NB: Numeric factory functions (https://drafts.css-houdini.org/css-typed-om-1/#numeric-factory) are generated, // see GenerateCSSNumericFactoryMethods.cpp }