Problem starts when activeDocument is changed (either by switching to another document or document close). Way I 'hacked' this problem was to implement onmouseover event (with 1sec timeout to debounce) that rereads activeDocument and repopulates classname and innerhtmls. Which kinda works - if I move mouse over panel. And has some lousy side-effects: mouse loses window resize grab after 1sec. I did it this way because I was unable to catch documentAfterActivate event or figure out any other proper way of handling this issue.
So, does anyone have any idea how to tackle this problem in photoshop cs6?
(TLDR version: How to "refresh" html widget panel in cs6 when app.activeDocument changes?)
Thanks in advance!