-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Prep for v1 #19
Conversation
src/headless_browser.ts
Outdated
interface MessageResponse { // For when we send an event to get one back, eg running a JS expression | ||
id: number; | ||
result?: { | ||
result: { [key: string]: unknown }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI; not all responses have an "inner" result, its common but not always.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok cheers, gotcha 👍 thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OMG THE TESTS PASS |
ready for review now |
} | ||
} | ||
// Connect websocket | ||
this.socket = new WebSocket(debugUrl); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we integrate wocket
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wocket is a ws server right? Sinco just needs a ws client - or do you mean to use-wocket-client?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same question i have for both of these comments... what's the best place i can read more about this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ill try get some info for you
this is cool... what's the advantage of using sockets vs sub process? |
So i heard from @caspervonb that using websockets is the better approach when connecting to headless chromium session, plus, there's a bug with sub process that essentially stops sinco from working - both reasons were why i switched to using web sockets, plus, using a sub process, we'd be running the headless browser as a repl ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i mean.... LGTM! 😎 I made a ticket for eval
too. feel free to comment on the ticket regarding func name!
Woop woop! will wait for a review from @crookse or @Guergeiro then - after that... Sinco v1 here we come 😎 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpicking here... Is just that I feel that if we are already in an async
function, why not just use await
everywhere we can instead of relying on synchronous jobs?
Fixes #7
Description
Work