Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 508217

Summary: [GTK3][Webkit] Implement webkit2 support for browser function (Part 1: JavaScript to call Java)
Product: [Eclipse Project] Platform Reporter: Leo Ufimtsev <lufimtse>
Component: SWTAssignee: Leo Ufimtsev <lufimtse>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 4.7   
Target Milestone: 4.7   
Hardware: PC   
OS: Linux   
See Also: https://bugs.eclipse.org/bugs/show_bug.cgi?id=269285
https://git.eclipse.org/r/89469
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=9b9501b0fef312da72586299e22d329f00ac5e20
https://bugs.eclipse.org/bugs/show_bug.cgi?id=Webkit2FuncRetVal
Whiteboard:
Bug Depends on: 509695, 510538    
Bug Blocks: 441568, 510694, 510776    

Description Leo Ufimtsev CLA 2016-11-25 15:41:26 EST
Browser function doesn't work on webkit2.

Example: Snippet307 produces an error "A java error occured: can't find variable 'external'".

Need to implement.
Comment 1 Leo Ufimtsev CLA 2016-12-05 16:01:43 EST
Got a snippet in C working where javascript calls a C callback via new api:
https://webkitgtk.org/reference/webkit2gtk/stable/WebKitUserContentManager.html#webkit-user-content-manager-register-script-message-handler 
webkit_user_content_manager_register_script_message_handler(..)

src:
https://github.com/LeoUfimtsev/LeoGtk3/blob/master/webkit_callback.c

Now need to port this business into SWT.
Comment 2 Eclipse Genie CLA 2017-01-24 14:50:38 EST
New Gerrit change created: https://git.eclipse.org/r/89469