So far in VSTO we were saving properties separately in every Worksheet. JavaScript API for Office doesn't have such function (as of 13/07/2018). Instead we can save those properties in Workbook's documentProperties which are accessable both in VSTO and JS.
Note: CP means CustomProperties (too long to write every time)
There is a bug with loading CP, so in order to load them we have to ensure that the list is not empty: