Class RhinoRuntime

java.lang.Object
tv.phantombot.script.RhinoRuntime

public final class RhinoRuntime extends Object
Rhino runtime environment configuration and management.
Author:
sartharon
  • Method Details

    • getContextFactory

      protected static RhinoContextFactory getContextFactory()
      Get the Rhino ContextFactory instance.
    • init

      public static void init(boolean enableGuiDebugger)
      Initialize the Rhino runtime environment with optional GUI debugger.
      Parameters:
      enableGuiDebugger - true to enable the GUI debugger, false otherwise.
    • getBaseScope

      protected static org.mozilla.javascript.ScriptableObject getBaseScope()
      Get the shared default Phantombot Rhino runtime script scope
    • callGlobalExposedScriptMethod

      public static String callGlobalExposedScriptMethod(String method, String arg)
    • ExposePropertyToScripts

      public static void ExposePropertyToScripts(String propertyName, Object property)
      Expose a property to all scripts via the $ api. Scripts can later use $.property and $.property.function() to access these
      Parameters:
      propertyName - The name of the property visible to the scripts
      property - The property object to be exposed to the scripts