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 Summary
Modifier and TypeMethodDescriptionvoidEmitted when the JavaScript window object in aWebKitScriptWorldhas been cleared.default MemorySegmenttoCallback(Arena arena) Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.default voidupcall(MemorySegment sourceScriptWorld, MemorySegment page, MemorySegment frame) Theupcallmethod is called from native code.
-
Method Details
-
run
Emitted when the JavaScript window object in aWebKitScriptWorldhas 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 offramefrom the JavaScript execution context ofworldthat is returned by webkit_frame_get_js_context_for_script_world().- Since:
- 2.2
-
upcall
Theupcallmethod is called from native code. The parameters are marshaled andrun(org.webkitgtk.webprocessextension.WebPage, org.webkitgtk.webprocessextension.Frame)is executed. -
toCallback
Creates a native function pointer to theupcall(java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment, java.lang.foreign.MemorySegment)method.- Specified by:
toCallbackin interfaceFunctionPointer- Parameters:
arena- the arena in which the function pointer is allocated- Returns:
- the native function pointer
-