Quantcast

BrowserFunction return value?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

BrowserFunction return value?

Leo Ufimtsev-2
Hello,

I'm working on the webkit2 port on Gtk.

Browser has a "BrowserFunction", with which Javascript can call java. One of the features is also for Java to provide a return value back to Javascript after the call is finished.

Does anyone know of any use case, production code or location where the BrowserFunction is actually required to provide a meaningful return value from java back to Javascript?

The reason I'm asking is that it's the only outstanding task for the webkit2 port 1*, but implementing it would require a pretty significant amount of time as one would have to deal with webkit2extensions.

Thank you

[1]
Bug 510905 - [GTK3][Webkit2] Implement webkit2 support for browser function (Part 2: Java return a value from callback.)

--
Leo Ufimtsev
Software Engineer, Eclipse team.
Toronto, Canada

Red Hat, Inc.
[hidden email] | http://DeveloperBlog.RedHat.com/

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BrowserFunction return value?

Ned Twigg
Does `SwtBrowser::evaluate` work?  If that works, then I think there will almost always be a workaround even if BrowserFunction doesn't fully work.

Ned Twigg
Lead Software Architect, DiffPlug LLC
540-336-8043 (cell)
888-513-6870 (fax)
340 S Lemon Ave #343
3, Walnut, CA 91789

On Wed, Mar 22, 2017 at 8:17 AM, Leo Ufimtsev <[hidden email]> wrote:
Hello,

I'm working on the webkit2 port on Gtk.

Browser has a "BrowserFunction", with which Javascript can call java. One of the features is also for Java to provide a return value back to Javascript after the call is finished.

Does anyone know of any use case, production code or location where the BrowserFunction is actually required to provide a meaningful return value from java back to Javascript?

The reason I'm asking is that it's the only outstanding task for the webkit2 port 1*, but implementing it would require a pretty significant amount of time as one would have to deal with webkit2extensions.

Thank you

[1]
<form name="m_7796085080715479339_changeform" id="m_7796085080715479339gmail-changeform" method="post" action="http://process_bug.cgi" target="_blank" onsubmit="try {return window.confirm(&quot;You are submitting information to an external page.\nAre you sure?&quot;);} catch (e) {return false;}">
Bug 510905 - [GTK3][Webkit2] Implement webkit2 support for browser function (Part 2: Java return a value from callback.)

--
Leo Ufimtsev
Software Engineer, Eclipse team.
Toronto, Canada

Red Hat, Inc.
[hidden email] | http://DeveloperBlog.RedHat.com/

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: BrowserFunction return value?

Leo Ufimtsev-2
Yea, evaluate() works quite well. I've tested with Strings/Numbers/Booleans/invalid types etc... Tested with lots of corner cases. (20+ jUnits cover various scenarios).

BrowserFunction does work in the sense javascript can call Java, but normally java can provide something as a return value back to javascript; this part doesn't work.

On Wed, Mar 22, 2017 at 5:49 PM, Ned Twigg <[hidden email]> wrote:
Does `SwtBrowser::evaluate` work?  If that works, then I think there will almost always be a workaround even if BrowserFunction doesn't fully work.

Ned Twigg
Lead Software Architect, DiffPlug LLC
<a href="tel:(540)%20336-8043" value="+15403368043" target="_blank">540-336-8043 (cell)
<a href="tel:(888)%20513-6870" value="+18885136870" target="_blank">888-513-6870 (fax)
340 S Lemon Ave #343
3, Walnut, CA 91789

On Wed, Mar 22, 2017 at 8:17 AM, Leo Ufimtsev <[hidden email]> wrote:
Hello,

I'm working on the webkit2 port on Gtk.

Browser has a "BrowserFunction", with which Javascript can call java. One of the features is also for Java to provide a return value back to Javascript after the call is finished.

Does anyone know of any use case, production code or location where the BrowserFunction is actually required to provide a meaningful return value from java back to Javascript?

The reason I'm asking is that it's the only outstanding task for the webkit2 port 1*, but implementing it would require a pretty significant amount of time as one would have to deal with webkit2extensions.

Thank you

[1]
<form name="m_48159993289262332_m_7796085080715479339_changeform" id="m_48159993289262332m_7796085080715479339gmail-changeform" method="post" action="http://process_bug.cgi" target="_blank" onsubmit="try {return window.confirm(&quot;You are submitting information to an external page.\nAre you sure?&quot;);} catch (e) {return false;}">
Bug 510905 - [GTK3][Webkit2] Implement webkit2 support for browser function (Part 2: Java return a value from callback.)

--
Leo Ufimtsev
Software Engineer, Eclipse team.
Toronto, Canada

Red Hat, Inc.
[hidden email] | http://DeveloperBlog.RedHat.com/

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev


_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev



--
Leo Ufimtsev
Software Engineer, Eclipse team.
Toronto, Canada

Red Hat, Inc.
[hidden email] | http://DeveloperBlog.RedHat.com/

_______________________________________________
platform-swt-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/platform-swt-dev
Loading...