michael Prosser - 2021-10-15 18:43:59
Hello and thank you for this incredible class. I had no issues getting your code to work but did find the browser was inconsistent in updating the subscription.
I found that in your example, if after the subscribe and unsubscribe functions are executed you fire the load function again (I delayed it 500ms using a setTimeout) the experience is superb.
<button id="unreg-btn" onclick="pnUnsubscribe(); setTimeout(function(){ Load(); },500);">Unsubscribe</button>
is an example that forces the browser to show you the new status right away (well 500ms later). Not sure how much delay is needed. It may just need a single frame and time can be set to 0 but 500 works well so I kept it that way.
Again, thank you :)