Closed irvinm closed 4 years ago
Look at TST doc example: https://github.com/piroor/treestyletab/blob/trunk/doc/boilerplate-helper-background.js
It is more async vs. sync with more error checking.
As of v1.1.1, I have added some retry logic around registerSelfToTST() with check-in: https://github.com/irvinm/TST-Lock/commit/c5f3c928fddbeee2cdd2d83e763f67b4a58d847d. It is clear that some calls to register to TST are made before TST is fully loaded and the try\catch logic has to take that into account and retry registering to TST until it is successful.
There is an initial call, then I added another call after the "ready" message is sent.
It seems to work now, but wondering if the first call is really needed or not.