0
votes

Running

document.querySelector("[light]").components.light.data.color="#A00";

Doesn't do anything, it will add color="#A00" if flushToDOM as an attribute but not change the light.

Changing light="color:#BBB" does work by hand, but what is the best way programmatically to do this now?

1

1 Answers

1
votes

Modifying the data object directly isn't supported - you'll want to use setAttribute instead. Example:

var lightEl = document.querySelector('[light]');
lightEl.setAttribute('light', {color: '#a00'});