OnBeforePopup noJavaScriptAccess parameter

Having problems with building or using the CefGlue .NET/Mono binding? Ask your questions here.

Moderator: fddima

OnBeforePopup noJavaScriptAccess parameter

Postby objectOlolo » Wed Apr 29, 2020 11:43 am

According documentation :
If the |no_javascript_access| value is set to false the new browser will not be scriptable and may not be hosted in the same renderer process as the source browser.
Could you please explain the meaning of "scriptable" and what restrictions this flag applies to window or what it's actually affect.
The problem is that since some of the version higher than 73, in 79 for sure, open.window script with combination of CefResponceHandler, stop works so fast because of creation of renderer and some other chromium secondary process.
CefResponceHandler return web content from local file. In 73 cef all works perfectly, both instance share code with difference that in 75+ versions there is middle class ResourceRequestHandler.
In case when I enable no_javascript_access flag nothing happenned literally, windows opens fast but without content no response handlers called even no load events called.
If you need any additional info free to ask, suddenly i can't share a code(
objectOlolo
Newbie
 
Posts: 7
Joined: Wed Apr 29, 2020 11:27 am

Re: OnBeforePopup noJavaScriptAccess parameter

Postby magreenblatt » Wed Apr 29, 2020 11:51 am

objectOlolo wrote:Could you please explain the meaning of "scriptable" and what restrictions this flag applies to window or what it's actually affect.

It should mean that the parent window and popup window cannot access each other via JavaScript (e.g. no access to window.parent or window.opener).

objectOlolo wrote:The problem is that since some of the version higher than 73, in 79 for sure, open.window script with combination of CefResponceHandler, stop works so fast because of creation of renderer and some other chromium secondary process.
CefResponceHandler return web content from local file. In 73 cef all works perfectly, both instance share code with difference that in 75+ versions there is middle class ResourceRequestHandler.

Sorry, I don't understand what you're saying here.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: OnBeforePopup noJavaScriptAccess parameter

Postby objectOlolo » Thu Apr 30, 2020 5:01 am

Well, I have a page that stored locally (html + some js).
That page returned via CefResourceHandler in CefClient that returned in OnBeforePopup. In 73 version of chromium that works perfectly and page opened less than a second, but after update to 79 version, open popup leads to render creation and some additional chromium processes and page openning takes 3+ seconds.
That flag looks like salvation for me, but after enable that flag combo with CefResourceHandler stop working and page openned fast but blank.
objectOlolo
Newbie
 
Posts: 7
Joined: Wed Apr 29, 2020 11:27 am

Re: OnBeforePopup noJavaScriptAccess parameter

Postby magreenblatt » Thu Apr 30, 2020 10:19 am

objectOlolo wrote:after update to 79 version, open popup leads to render creation and some additional chromium processes and page openning takes 3+ seconds.

Is the popup using the same origin (scheme + domain) as the parent page? If so, it should use the same renderer process.
magreenblatt
Site Admin
 
Posts: 12382
Joined: Fri May 29, 2009 6:57 pm

Re: OnBeforePopup noJavaScriptAccess parameter

Postby objectOlolo » Mon May 18, 2020 5:25 am

No domain is not same but, it works fine in 73 version and in 79 version same logic leads to create new renderer.
objectOlolo
Newbie
 
Posts: 7
Joined: Wed Apr 29, 2020 11:27 am

Re: OnBeforePopup noJavaScriptAccess parameter

Postby amaitland » Mon May 18, 2020 5:58 am

Try using the disable-site-isolation-trials command line arg
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1290
Joined: Wed Jan 14, 2015 2:35 am


Return to CefGlue Forum

Who is online

Users browsing this forum: No registered users and 15 guests