localStorage.setValue() in a transformer?

Is it possible to use this method in a transformer? I get a "The document is sandboxed and lacks the 'allow-same-origin' flag." when I try to use it in a transformer, but it works fine in a plain javascript block. Ideally, I'd like to update the local storage in the transformer since it gets automatically called when the inputs change.

Is it possible to run it in a Success event handler after the query is run?

As far as I know, transformers don't have success event handlers. I suppose I could push the transformer into the query itself and then call the query success handler... let me look at that.

Actually that won't work in my use case... I have several queries that are all being transformed in some way and then merged together with business logic in a "final" transformer. It's that result that I want pushed to localStorage so that I can use it in other "pages" - apps. It's not a big deal to add another JS script after that transformer to push it into localStorage, but to minimize the objects, I figured I'd try it in that final transformer.

Hey @pyee! You're correct that JS transformers can't run .setValue functions. You'll need to use a JS query or an event handler in order to run .setValue functions. Let me know if you have any questions at all.