In all methods which take a property parameter, there is a very early step says:
Let property be property converted to ASCII lowercase.
However, name of custom properties is case-sensitive, so this step would mess up custom properties.
In addition to that, some of the methods also have:
If property is not a case-sensitive match for a supported CSS property, terminate this algorithm.
This would make the method not usable for custom properties.
I think the solution is to recognize custom properties in an early step, and only apply the above steps to non-custom properties.