I want to change the background color of a button within #shadow-root through Javascript but for some reason I can't get it to change.
Here is the structure of the HTML:
let modalLaunchSelectorColor = adzoneElementSelector?.querySelector("#ipm-card-tellmemore-btn").shadowRoot.querySelector("button");
For reference here is the function I have to change the background color:
if (hasValue(context.buttonColor?.hex)) modalLaunchSelectorColor.style.backgroundColor == context.buttonColor.hex;
And here is the context object:
Any ideas of what is going wrong here?