where Foo is the name of another JS action
import Foo from "./Foo"
where bar.js is another js file in your project folder.
import Bar from "./path/to/bar.js"
document.querySelector('.userFormpane').classList.add("opened") // add class
or you could use the standard Mendix platform Conditional Visibility functionality to hide and show your content. Either of these methods would be a more maintainable (and lightweight) solution to what it seems you’re trying to achieve