Interface ScriptWorld.WindowObjectClearedCallback

All Superinterfaces:
FunctionPointer
Enclosing class:
ScriptWorld
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface ScriptWorld.WindowObjectClearedCallback extends FunctionPointer

Functional interface declaration of the WindowObjectClearedCallback callback.

See Also:
  • Method Details

    • run

      void run(@Nullable WebPage page, @Nullable Frame frame)
      Emitted when the JavaScript window object in a WebKitScriptWorld has been cleared. This is the preferred place to set custom properties on the window object using the JavaScriptCore API. You can get the window object of frame from the JavaScript execution context of world that is returned by webkit_frame_get_js_context_for_script_world().
      Since:
      2.2
    • upcall

      default void upcall(MemorySegment sourceScriptWorld, MemorySegment page, MemorySegment frame)
      The upcall method is called from native code. The parameters are marshaled and run(WebPage, Frame) is executed.
    • toCallback

      default MemorySegment toCallback(Arena arena)
      Creates a native function pointer to the upcall(MemorySegment, MemorySegment, MemorySegment) method.
      Specified by:
      toCallback in interface FunctionPointer
      Parameters:
      arena - the arena in which the function pointer is allocated
      Returns:
      the native function pointer