Class WindowOrWorkerGlobalScopeMixin

java.lang.Object
org.htmlunit.javascript.host.WindowOrWorkerGlobalScopeMixin

public final class WindowOrWorkerGlobalScopeMixin extends Object
The implementation of WindowOrWorkerGlobalScope to be used by the implementers of the mixin.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private static final int
    The minimum delay that can be used with setInterval() or setTimeout().
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static String
    atob(String encodedData)
    Decodes a string of data which has been encoded using base-64 encoding.
    static String
    btoa(String stringToEncode)
    Creates a base-64 encoded ASCII string from a string of binary data.
    static Object
    setInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
    Sets a chunk of JavaScript to be invoked each time a specified number of milliseconds has elapsed.
    static Object
    setTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
    Sets a chunk of JavaScript to be invoked at some specified time later.
    private static int
    setTimeoutIntervalImpl(Window window, Object code, int timeout, boolean isTimeout, Object[] params)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • WindowOrWorkerGlobalScopeMixin

      private WindowOrWorkerGlobalScopeMixin()
  • Method Details

    • atob

      public static String atob(String encodedData)
      Decodes a string of data which has been encoded using base-64 encoding.
      Parameters:
      encodedData - the encoded string
      Returns:
      the decoded value
    • btoa

      public static String btoa(String stringToEncode)
      Creates a base-64 encoded ASCII string from a string of binary data.
      Parameters:
      stringToEncode - string to encode
      Returns:
      the encoded string
    • setTimeout

      public static Object setTimeout(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
      Sets a chunk of JavaScript to be invoked at some specified time later. The invocation occurs only if the window is opened after the delay and does not contain an other page than the one that originated the setTimeout.
      Parameters:
      context - the JavaScript context
      thisObj - the scriptable
      args - the arguments passed into the method
      function - the function
      Returns:
      the id of the created timer
      See Also:
    • setInterval

      public static Object setInterval(org.htmlunit.corejs.javascript.Context context, org.htmlunit.corejs.javascript.Scriptable thisObj, Object[] args, org.htmlunit.corejs.javascript.Function function)
      Sets a chunk of JavaScript to be invoked each time a specified number of milliseconds has elapsed.
      Parameters:
      context - the JavaScript context
      thisObj - the scriptable
      args - the arguments passed into the method
      function - the function
      Returns:
      the id of the created interval
      See Also:
    • setTimeoutIntervalImpl

      private static int setTimeoutIntervalImpl(Window window, Object code, int timeout, boolean isTimeout, Object[] params)