Access to Javascript Window Binding / Extensions via JCEF?

Having problems with building or using the JCEF Java binding? Ask your questions here.

Access to Javascript Window Binding / Extensions via JCEF?

Postby KatrinaS » Tue Jul 04, 2023 6:41 pm

Hi Mr (or sorry, Ms/Mrs) Greenblatt, can you consider adding / exposing (more?) easy access to Javascript Window Binding / Extensions (as on https://bitbucket.org/chromiumembedded/ ... gration.md) to JCEF? Cheers! :)
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Access to Javascript Window Binding / Extensions via JCE

Postby magreenblatt » Wed Jul 05, 2023 3:44 am

Java does not run in the renderer process, so you can't use JavaScript bindings directly from Java code. Your current options are:

magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Access to Javascript Window Binding / Extensions via JCE

Postby KatrinaS » Wed Jul 05, 2023 4:30 am

Hokey I'll take a look :)
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Access to Javascript Window Binding / Extensions via JCE

Postby KatrinaS » Wed Jul 05, 2023 12:07 pm

Oh Iiiii see, the Native context is basically transparent to Java (it's a,, don't worry your pretty little head about it :lol:), just give CefMessageRouter.create() a CefMessageRouterConfig, I get it :D I'm actually thinking if the Javascript itself can generate it's own CefMessageRouterHandlerAdapter(s) from its side by passing the Script to the CefMessageRouter (and using Apache/Mozilla Rhino) and so removing the 'complexed matters' from the (my) Browser wrapper class and making it all readily editable and refreshable from (on the next page load) in the HTML/JS... Hmm interesting...

Hokey :lol:
Last edited by KatrinaS on Sun Jul 09, 2023 6:54 am, edited 1 time in total.
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Access to Javascript Window Binding / Extensions via JCE

Postby KatrinaS » Fri Jul 07, 2023 9:28 am

Done, very good :D What's the largest a 'request' can be, I know it's 2 MB for Uri / Url but these type of requests I don't know :) Hopefully 'how much memory have you got' (just in case) :D
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm

Re: Access to Javascript Window Binding / Extensions via JCE

Postby magreenblatt » Fri Jul 07, 2023 2:36 pm

The limit is large but not unlimited. Consider breaking the message into smaller chunks if it’s extremely large.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Access to Javascript Window Binding / Extensions via JCE

Postby KatrinaS » Fri Jul 07, 2023 3:49 pm

Thanks :) Some form of chunk accumulation and reassembly certainly is a definite if I ever do hit a limit :D
KatrinaS
Mentor
 
Posts: 83
Joined: Tue Jul 04, 2023 6:30 pm


Return to JCEF Forum

Who is online

Users browsing this forum: No registered users and 136 guests