// The set(property, ...values) method, when called on a StylePropertyMap this, must perform the following steps:
// 1. If property is not a custom property name string, set property to property ASCII lowercased.
if(!is_a_custom_property_name_string(property))
property=property.to_ascii_lowercase();
// 2. If property is not a valid CSS property, throw a TypeError.
if(!is_a_valid_css_property(property))
returnWebIDL::SimpleException{WebIDL::SimpleExceptionType::TypeError,MUST(String::formatted("'{}' is not a valid CSS property",property))};
// FIXME: 3. If property is a single-valued property and values has more than one item, throw a TypeError.
// FIXME: 4. If any of the items in values have a non-null [[associatedProperty]] internal slot, and that slot’s value is anything other than property, throw a TypeError.
// FIXME: 5. If the size of values is two or more, and one or more of the items are a CSSUnparsedValue or CSSVariableReferenceValue object, throw a TypeError.
// NOTE: Having 2+ values implies that you’re setting multiple items of a list-valued property, but the presence of
// a var() function in the string-based OM disables all syntax parsing, including splitting into individual
// iterations (because there might be more commas inside of the var() value, so you can’t tell how many items
// are actually going to show up). This step’s restriction preserves the same semantics in the Typed OM.
// 6. Let props be the value of this’s [[declarations]] internal slot.
// The append(property, ...values) method, when called on a StylePropertyMap this, must perform the following steps:
// 1. If property is not a custom property name string, set property to property ASCII lowercased.
if(!is_a_custom_property_name_string(property))
property=property.to_ascii_lowercase();
// 2. If property is not a valid CSS property, throw a TypeError.
if(!is_a_valid_css_property(property))
returnWebIDL::SimpleException{WebIDL::SimpleExceptionType::TypeError,MUST(String::formatted("'{}' is not a valid CSS property",property))};
// FIXME: 3. If property is not a list-valued property, throw a TypeError.
// FIXME: 4. If any of the items in values have a non-null [[associatedProperty]] internal slot, and that slot’s value is anything other than property, throw a TypeError.
// FIXME: 5. If any of the items in values are a CSSUnparsedValue or CSSVariableReferenceValue object, throw a TypeError.
// NOTE: When a property is set via string-based APIs, the presence of var() in a property prevents the entire thing from being interpreted. In other words, everything besides the var() is a plain component value, not a meaningful type. This step’s restriction preserves the same semantics in the Typed OM.
// 6. Let props be the value of this’s [[declarations]] internal slot.