Is it possible to update custom states using JS?

I want to change page custom state using javascript! is possible in bubble.io?

I might be… to be honest I don’t know, but I’ve never figured out a way to do it directly…

But why would you need to?

Just use a JavaScript to Bubble element value instead of a custom state (or, if you really need to set a custom state value, use the JavaScript to Bubble event as a trigger to set the custom state value)