This means that if the user makes some changes to one tab and then opens up a new tab after that - these userpreference changes will not be reflected here. This is because those changes have not been saved to the repo yet.
One way around this could be to tie the save call to the "visibilitychange" event rather than the "onbeforeunload" event - which would also increase the reliability of this call.
After the enhancements to https://github.com/tsgrp/HPI/issues/2413 the userpreferences save calls only happen when a user -
This means that if the user makes some changes to one tab and then opens up a new tab after that - these userpreference changes will not be reflected here. This is because those changes have not been saved to the repo yet.
One way around this could be to tie the save call to the "visibilitychange" event rather than the "onbeforeunload" event - which would also increase the reliability of this call.
This is also the recommended way to use the sendBeacon method - https://developer.mozilla.org/en-US/docs/Web/API/Navigator/sendBeacon