JavaScript is disabled on your browser.
Skip navigation links
org.htmlunit.javascript.background

Class BackgroundJavaScriptFactory



  • public class BackgroundJavaScriptFactory
    extends Object 
    A factory for all the things we have to construct from outside the JavaScript engine.
    Author:
    Ronald Brill, Atsushi Nakagawa
    • Constructor Detail

      • BackgroundJavaScriptFactory

        protected BackgroundJavaScriptFactory()
        The constructor.
    • Method Detail

      • setFactory

        public static void setFactory(BackgroundJavaScriptFactory factory)
        Set the factory to a new one.
        Parameters:
        factory - the new factory.
      • createJavaScriptJob

        public JavaScriptJob createJavaScriptJob(int initialDelay,
         Integer period,
         String label,
         WebWindow window,
         String script)
        Creates a new JavaScript execution job, where the JavaScript code to execute is a string.
        Parameters:
        initialDelay - the initial amount of time to wait before executing this job
        period - the amount of time to wait between executions of this job (maybe null)
        label - the label for the job
        window - the window to which the job belongs
        script - the JavaScript code to execute
        Returns:
        JavaScriptJob the created job
      • createJavaScriptJob

        public org.htmlunit.javascript.background.JavaScriptFunctionJob createJavaScriptJob(int initialDelay,
         Integer period,
         String label,
         WebWindow window,
         org.htmlunit.corejs.javascript.Function function,
         Object[] args)
        Creates a new JavaScript execution job, where the JavaScript code to execute is a function.
        Parameters:
        initialDelay - the initial amount of time to wait before executing this job
        period - the amount of time to wait between executions of this job (maybe null)
        label - the label for the job
        window - the window to which the job belongs
        function - the JavaScript code to execute
        args - the arguments to pass into the function call
        Returns:
        JavaScriptJob the created job
      • createJavaScriptJob

        public JavaScriptJob createJavaScriptJob(int initialDelay,
         Integer period,
         Runnable runnable)
        Creates a new job.
        Parameters:
        initialDelay - the initial amount of time to wait before executing this job
        period - the amount of time to wait between executions of this job (maybe null)
        runnable - the runnable to run
        Returns:
        JavaScriptJob the created job
      • createJavaScriptExecutor

        public JavaScriptExecutor createJavaScriptExecutor(WebClient webClient)
        Creates the JavaScriptExecutor that will be used to handle JS.
        Parameters:
        webClient - the WebClient of the executor
        Returns:
        the executor.
      • createJavaScriptJobManager

        public JavaScriptJobManager createJavaScriptJobManager(WebWindow webWindow)
        Creates a new JavaScriptJobManager for the given window.
        Parameters:
        webWindow - the window the JavaScriptJobManager will work for
        Returns:
        the new JavaScriptJobManager
Skip navigation links

Copyright © 2002–2025 Gargoyle Software Inc.. All rights reserved.

AltStyle によって変換されたページ (->オリジナル) /