It may well be that exact implementation isn’t the best solution, if it makes more sense to have a special setCustomProperty
that can only be used for that job to separate the implementation or some other alternate solution, that’s reasonable.
My focus is that the feature needs to be surfaced otherwise Elm is going to end up making any modern webcomponent unusable, and blocking access to other modern features (e.g: Houdini), I’m not advocating for any specific solution to surfacing it.