Setting CSS attribute with hyphen

Hello, I’m trying to set mask-image in Style using custom code, but cannot define CSS attributes with hyphen properly. Any suggestion on how? Thanks

Can you try wrapping it with quotes? "mask-image": ...

if this is the style html attribute, you should use camel case (maskImage)

Hi, none of these suggestions worked unfortunately. I was able to get it to work with JSON.parse('{"mask-image": "..." }') but that is quite verbose