Is there any way to detect when a dashboard is reloading?

I am trying to work out a custom widget that is a little more sonos specific, and found the cool playlist widget on here. I am running into some snags around dashboard lifecycle - for example, reloading the dashboard at least pauses the music - worst case even changes the music.

Is there anything that I can use to detect in the widget’s code that it is “loading”? This would enable me to ignore the change event the first time through.

Hoping to get this to also show some kind of artwork.

image

I guess a size question also - is there any way to detect “hey, the widget is too small, don’t bother trying to show artwork”?

Thanks,

-jamie

not if you dont start programming js and start creating your own custom widget.
i guess you could build in a timer inside the widget in JS, and when its reset it will get to zero, so you know its reloaded.

i guess its that widget, because normally a widget doesnt change anything in HA on reloading (or at least none of the default widgets)

i think there is a way in JS to look at the widget size, and you could program a part that looks if that is inside a certain minimum.

if it is your own custom widget, then i think you need to start more specific JS questions and share what the code is now.
if its from another and you want changes, i guess you need to ask the creator.