How to pass "window" object between pages

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

How to pass "window" object between pages

Postby yanivt » Mon Dec 28, 2020 10:29 am

Hi
I wonder if possible to pass “window” object via global context at CEF.

I tried the next way
e.g

get the pV8 object and pass it as parameter to other context.
Code: Select all
CefRefPtr<CefV8Value> myPv8 = context->GetGlobal();

I want to keep myPv8 on static object.
And pass it to other page e.g.
Code: Select all
pV8->SetValue("myPV", myPv8, V8_PROPERTY_ATTRIBUTE_NONE);


even when its on the same render process I get this error in the output log while trying to call the SetValue function

[5040] [1228/164909.805:FATAL:v8_impl.cc(2019)] Check failed: false. invalid input parameter

Any idea if its feasible at all ? or how to do it correctly ?

Thanks on any direction
Yaniv
yanivt
Techie
 
Posts: 12
Joined: Sun Dec 06, 2020 11:10 am

Re: How to pass "window" object between pages

Postby amaitland » Thu Dec 31, 2020 12:34 am

I don't believe this is supported.

What exactly do you need to pass the window object for?
Maintainer of the CefSharp project.
amaitland
Virtuoso
 
Posts: 1292
Joined: Wed Jan 14, 2015 2:35 am

Re: How to pass "window" object between pages

Postby yanivt » Thu Dec 31, 2020 3:35 am

we are migrating project , and we need to share JavaScript and DOM via window object.
yanivt
Techie
 
Posts: 12
Joined: Sun Dec 06, 2020 11:10 am


Return to Support Forum

Who is online

Users browsing this forum: No registered users and 49 guests