JavaScript is disabled on your browser.
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method
org.htmlunit.javascript

Interface AbstractJavaScriptEngine<SCRIPT>

  • Type Parameters:
    SCRIPT - the script type
    All Known Implementing Classes:
    JavaScriptEngine


    public interface AbstractJavaScriptEngine<SCRIPT>
    An interface for JavaScriptEngine.
    Author:
    Mike Bowler, Chen Jun, David K. Taylor, Chris Erskine, Ben Curren, David D. Kilzer, Marc Guillemot, Daniel Gredler, Ahmed Ashour, Amit Manjhi, Ronald Brill, Frank Danek
    • Method Detail

      • getJavaScriptConfiguration

        JavaScriptConfiguration getJavaScriptConfiguration()
        Gets the associated configuration.
        Returns:
        the configuration
      • addPostponedAction

        void addPostponedAction(PostponedAction action)
        Adds an action that should be executed first when the script currently being executed has finished.
        Parameters:
        action - the action
      • processPostponedActions

        void processPostponedActions()
        INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
        Process postponed actions, if any.
      • registerWindowAndMaybeStartEventLoop

        void registerWindowAndMaybeStartEventLoop(WebWindow webWindow)
        Register WebWindow with the JavaScriptExecutor.
        Parameters:
        webWindow - the WebWindow to be registered.
      • initialize

        void initialize(WebWindow webWindow,
         Page page)
        Performs initialization for the given webWindow and page.
        Parameters:
        webWindow - the web window to initialize for
        page - the page that will become the enclosing page
      • setJavaScriptTimeout

        void setJavaScriptTimeout(long timeout)
        Sets the number of milliseconds that a script is allowed to execute before being terminated. A value of 0 or less means no timeout.
        Parameters:
        timeout - the timeout value, in milliseconds
      • getJavaScriptTimeout

        long getJavaScriptTimeout()
        Returns the number of milliseconds that a script is allowed to execute before being terminated. A value of 0 or less means no timeout.
        Returns:
        the timeout value, in milliseconds
      • prepareShutdown

        void prepareShutdown()
        Disable starting of new js threads.
      • shutdown

        void shutdown()
        Shutdown the JavaScriptEngine.
      • isScriptRunning

        boolean isScriptRunning()
        Indicates if JavaScript is running in current thread. This allows code to know if their own evaluation is has been triggered by some JS code.
        Returns:
        true if JavaScript is running
      • holdPosponedActions

        void holdPosponedActions()
        INTERNAL API - SUBJECT TO CHANGE AT ANY TIME - USE AT YOUR OWN RISK.
        Indicates that no postponed action should be executed.
      • compile

        SCRIPT compile(HtmlPage owningPage,
         org.htmlunit.corejs.javascript.Scriptable scope,
         String sourceCode,
         String sourceName,
         int startLine)
        Compiles the specified JavaScript code in the context of a given scope.
        Parameters:
        owningPage - the page from which the code started
        scope - the scope in which to execute the javascript code
        sourceCode - the JavaScript code to execute
        sourceName - the name that will be displayed on error conditions
        startLine - the line at which the script source starts
        Returns:
        the result of executing the specified code
      • execute

        Object execute(HtmlPage page,
         org.htmlunit.corejs.javascript.Scriptable scope,
         SCRIPT script)
        Executes the specified JavaScript code in the context of a given page.
        Parameters:
        page - the page that the code will execute within
        scope - the scope in which to execute
        script - the script to execute
        Returns:
        the result of executing the specified code
      • execute

        Object execute(HtmlPage page,
         org.htmlunit.corejs.javascript.Scriptable scope,
         String sourceCode,
         String sourceName,
         int startLine)
        Executes the specified JavaScript code in the context of a given page.
        Parameters:
        page - the page that the code will execute within
        scope - the scope in which to execute
        sourceCode - the JavaScript code to execute
        sourceName - the name that will be displayed on error conditions
        startLine - the line at which the script source starts
        Returns:
        the result of executing the specified code
Skip navigation links
  • Summary:
  • Nested |
  • Field |
  • Constr |
  • Method
  • Detail:
  • Field |
  • Constr |
  • Method

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

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