I get "Cannot set property 'onchange' of null" console error. When I try to wrap the handler in a window.onload
function, it makes the function I am trying to call undefined. I suspect it has something to do with the fact that Spectrumjs "sp-choose" button does not exist until it the color picker is opened.
Here is a link to my Fiddle that best shows the issue.