Page 1 of 1

OnBeforePopup noJavaScriptAccess parameter

PostPosted: Wed Apr 29, 2020 11:43 am
by objectOlolo
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(

Re: OnBeforePopup noJavaScriptAccess parameter

PostPosted: Wed Apr 29, 2020 11:51 am
by magreenblatt
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.

Re: OnBeforePopup noJavaScriptAccess parameter

PostPosted: Thu Apr 30, 2020 5:01 am
by objectOlolo
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.

Re: OnBeforePopup noJavaScriptAccess parameter

PostPosted: Thu Apr 30, 2020 10:19 am
by magreenblatt
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.

Re: OnBeforePopup noJavaScriptAccess parameter

PostPosted: Mon May 18, 2020 5:25 am
by objectOlolo
No domain is not same but, it works fine in 73 version and in 79 version same logic leads to create new renderer.

Re: OnBeforePopup noJavaScriptAccess parameter

PostPosted: Mon May 18, 2020 5:58 am
by amaitland
Try using the disable-site-isolation-trials command line arg