You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to create an environment for scripts that expect to be run in browsers. I can define window, but that doesn't help when the JS is looking at location or document or any other number of things. I presume things like that work because window is the global object, and they're defined there (window.location, window.document, etc.)
I am sure libv8 has some tweak to make this happen, we do not have it
exposed though.
Maybe walk all the props on window and set them as top level vars?
On Sun, Jan 5, 2020 at 2:11 PM Jason Barnabe ***@***.***> wrote:
I'm trying to create an environment for scripts that expect to be run in
browsers. I can define window, but that doesn't help when the JS is
looking at location or document or any other number of things. I presume
things like that work because window is the global object, and they're
defined there (window.location, window.document, etc.)
Is there a way to specify the global object?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#156?email_source=notifications&email_token=AAABIXNSWVH4QQ2NP3UUFH3Q4FFX5A5CNFSM4KCZFT22YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4IEBR46A>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAABIXJTHZ5RBRE7XVOXFA3Q4FFX5ANCNFSM4KCZFT2Q>
.
Activity
SamSaffron commentedon Jan 6, 2020
JasonBarnabe commentedon Jan 6, 2020
Yeah, that's the backup plan.
SamSaffron commentedon Jan 9, 2020
I am guessing it is something like this:
https://github.com//blob/e5e8685c15494da58112fc1ab76e2dfc15fbf728/test/cctest/test-api-interceptors.cc#L3185-L3185
I support a PR that gives us something like this I guess?
tisba commentedon May 30, 2023
The link was broken (404): https://github.com/v8/v8/blob/e5e8685c15494da58112fc1ab76e2dfc15fbf728/test/cctest/test-api-interceptors.cc#L3185-L3185