global

The global object provides access to persistent variables that can be shared across documents and Revu sessions. Variables stored on the global object persist for the current Revu session, and can optionally be made to persist across Revu restarts.

Example

Copy
// Store a value globally
global.userName = "John Smith"

// Access from another document
console.println(global.userName) // Outputs: John Smith

// Delete a global variable
delete global.userName

Methods

setPersistent

Secure
No

Controls whether a global variable persists across Revu sessions.

setPersistent(cVariable, bPersist)

  • cVariable: Name of the global variable. The variable must already exist on the global object.

  • bPersist: When true, the variable persists across Revu sessions. When false, the variable only exists for the current session.

Throws an exception if the operation fails.

Example

Copy
global.companyName = "Acme Corp"
global.setPersistent("companyName", true) // Will persist after Revu restart

Resources

Revu 21

Revu JavaScript

JavaScript

The Revu API Reference Guide documents all JavaScript capabilities available in Revu.