Trait

io.scalajs.nodejs.vm

ContextifyScript

Related Doc: package vm

Permalink

trait ContextifyScript extends Object

Contextify Script

Annotations
@RawJSType() @native()
Linear Supertypes
Object, Any, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ContextifyScript
  2. Object
  3. Any
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def createContext(sandbox: Any): ScriptContext

    Permalink

    If given a sandbox object, the vm.createContext() method will [prepare that sandbox][#vm_what_does_it_mean_to_contextify_an_object] so that it can be used in calls to vm.runInContext() or script.runInContext().

    If given a sandbox object, the vm.createContext() method will [prepare that sandbox][#vm_what_does_it_mean_to_contextify_an_object] so that it can be used in calls to vm.runInContext() or script.runInContext(). Inside such scripts, the sandbox object will be the global object, retaining all of its existing properties but also having the built-in objects and functions any standard global object has. Outside of scripts run by the vm module, sandbox will remain unchanged.

    If sandbox is omitted (or passed explicitly as undefined), a new, empty contextified sandbox object will be returned.

    The vm.createContext() method is primarily useful for creating a single sandbox that can be used to run multiple scripts. For instance, if emulating a web browser, the method can be used to create a single sandbox representing a window's global object, then run all <script> tags together within the context of that sandbox.

    sandbox

    the given sandbox

    Example:
    1. vm.createContext([sandbox])

    Since

    0.11.7

  7. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  8. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  9. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  10. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  11. def hasOwnProperty(v: String): Boolean

    Permalink
    Definition Classes
    Object
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. def isPrototypeOf(v: Object): Boolean

    Permalink
    Definition Classes
    Object
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. def propertyIsEnumerable(v: String): Boolean

    Permalink
    Definition Classes
    Object
  19. def runInContext(contextifiedSandbox: ScriptContext, options: ScriptOptions = null): Any

    Permalink

    Runs the compiled code contained by the vm.Script object within the given contextifiedSandbox and returns the result.

    Runs the compiled code contained by the vm.Script object within the given contextifiedSandbox and returns the result. Running code does not have access to local scope.

    contextifiedSandbox

    A contextified object as returned by the vm.createContext() method.

    options

    the optional options

    Example:
    1. script.runInContext(contextifiedSandbox[, options])

  20. def runInDebugContext(code: String): Any

    Permalink

    The vm.runInDebugContext() method compiles and executes code inside the V8 debug context.

    The vm.runInDebugContext() method compiles and executes code inside the V8 debug context.

    code

    The JavaScript code to compile and run.

    Example:
    1. vm.runInDebugContext(code)

  21. def runInNewContext(sandbox: Any, options: ScriptOptions = null): Any

    Permalink

    First contextifies the given sandbox, runs the compiled code contained by the vm.Script object within the created sandbox, and returns the result.

    First contextifies the given sandbox, runs the compiled code contained by the vm.Script object within the created sandbox, and returns the result. Running code does not have access to local scope.

    sandbox

    An object that will be contextified. If undefined, a new object will be created.

    options

    the optional options

    Example:
    1. script.runInNewContext([sandbox][, options])

  22. def runInThisContext(options: ScriptOptions = null): ContextifyScript

    Permalink

    Runs the compiled code contained by the vm.Script within the context of the current global object.

    Runs the compiled code contained by the vm.Script within the context of the current global object. Running code does not have access to local scope, but does have access to the current global object.

    options

    the optional options

    Example:
    1. script.runInThisContext([options])

  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toLocaleString(): String

    Permalink
    Definition Classes
    Object
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. def valueOf(): Any

    Permalink
    Definition Classes
    Object
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Object

Inherited from Any

Inherited from AnyRef

Inherited from Any

Ungrouped