UXP (IDJS) LocalStorage usage
Hi everyone,
I'm tinkering around with the new UXP javascript in InDesign and would like to store a value in LocalStorage. But I can't seem to get a value saved to storage.
Here is my code:
main();
function main() {
console.log('Main function entered.');
window.localStorage.setItem('myKey', 'myValue');
console.log(window.localStorage.getItem('myKey'));
}Code is in /Users/<my-username>/Library/Preferences/Adobe InDesign/Version 18.0/de_DE/Scripts/Scripts Panel/my-scripts/localStorage.idjs
I'm tailing the log files in Terminal from /Users/<my-username>/Library/Caches/UXPLogs to see the console.log() output. The first log entry shows Main function entered. but the second one is null.
Am I missing something?
My InDesign version is 18.0 on OSX 12.6.1
