Interface CefFrame


  • public interface CefFrame
    Interface representing a frame.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void dispose()
      Removes the native reference from an unused object.
      void executeJavaScript​(java.lang.String code, java.lang.String url, int line)
      Execute a string of JavaScript code in this frame.
      long getIdentifier()
      Returns the globally unique identifier for this frame or < 0 if the underlying frame does not yet exist.
      java.lang.String getName()
      Returns the name for this frame.
      CefFrame getParent()
      Returns the parent of this frame or NULL if this is the main (top-level) frame.
      java.lang.String getURL()
      Emits the URL currently loaded in this frame.
      boolean isFocused()
      Returns true if this is the focused frame.
      boolean isMain()
      Returns true if this is the main (top-level) frame.
      boolean isValid()
      True if this object is currently attached to a valid frame.
    • Method Detail

      • dispose

        void dispose()
        Removes the native reference from an unused object.
      • getIdentifier

        long getIdentifier()
        Returns the globally unique identifier for this frame or < 0 if the underlying frame does not yet exist.
        Returns:
        The frame identifier
      • getURL

        java.lang.String getURL()
        Emits the URL currently loaded in this frame.
        Returns:
        the URL currently loaded in this frame.
      • getName

        java.lang.String getName()
        Returns the name for this frame. If the frame has an assigned name (for example, set via the iframe "name" attribute) then that value will be returned. Otherwise a unique name will be constructed based on the frame parent hierarchy. The main (top-level) frame will always have an empty name value.
        Returns:
        The frame name
      • isMain

        boolean isMain()
        Returns true if this is the main (top-level) frame.
        Returns:
        True if this frame is top-level otherwise false.
      • isValid

        boolean isValid()
        True if this object is currently attached to a valid frame.
        Returns:
        True if valid otherwise false.
      • isFocused

        boolean isFocused()
        Returns true if this is the focused frame.
        Returns:
        True if valid otherwise false.
      • getParent

        CefFrame getParent()
        Returns the parent of this frame or NULL if this is the main (top-level) frame.
        Returns:
        The parent frame or NULL if this is the main frame
      • executeJavaScript

        void executeJavaScript​(java.lang.String code,
                               java.lang.String url,
                               int line)
        Execute a string of JavaScript code in this frame. The url parameter is the URL where the script in question can be found, if any. The renderer may request this URL to show the developer the source of the error. The line parameter is the base line number to use for error reporting.
        Parameters:
        code - The code to be executed.
        url - The URL where the script in question can be found.
        line - The base line number to use for error reporting.