Class Frame

All Implemented Interfaces:
Proxy

@Generated("org.javagi.JavaGI") public final class Frame extends GObject

A web page frame.

Each WebKitWebPage has at least one main frame, and can have any number of subframes.

Since:
2.26
  • Constructor Details

    • Frame

      public Frame(MemorySegment address)
      Create a Frame instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • Frame

      public Frame()
      Create a new Frame.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Get the GType of the Frame class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected Frame asParent()
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class GObject
      Returns:
      the instance as if it were its parent type
    • getId

      public long getId()
      Gets the process-unique identifier of this WebKitFrame. No other frame in the same web process will have the same ID; however, frames in other web processes may.
      Returns:
      the identifier of this Frame
      Since:
      2.26
    • getJsContext

      public Context getJsContext()
      Get the JavaScript execution context of frame. Use this function to bridge between the WebKit and JavaScriptCore APIs.
      Returns:
      the JSCContext for the JavaScript execution context of frame.
      Since:
      2.22
    • getJsContextForScriptWorld

      public Context getJsContextForScriptWorld(ScriptWorld world)
      Get the JavaScript execution context of this Frame for the given WebKitScriptWorld.
      Parameters:
      world - a WebKitScriptWorld
      Returns:
      the JSCContext for the JavaScript execution context of this Frame for world.
      Since:
      2.22
    • getUri

      public String getUri()
      Gets the current active URI of frame.
      Returns:
      the current active URI of this Frame or null if nothing has been loaded yet.
      Since:
      2.2
    • isMainFrame

      public boolean isMainFrame()
      Gets whether this Frame is the main frame of a WebKitWebPage
      Returns:
      true if this Frame is a main frame or false otherwise
      Since:
      2.2
    • builder

      public static Frame.Builder<? extends Frame.Builder> builder()
      A Frame.Builder object constructs a Frame with the specified properties. Use the various set...() methods to set properties, and finish construction with Frame.Builder.build().
      Returns:
      the builder object