Closed RLesur closed 5 years ago
I am really embarrassed by https://github.com/RLesur/crrri/blob/224df2f68b84ea8aae231078eba658f88f26af63/R/DevToolsConnexion.R#L27-L32
There are two kinds of messages sent by Chrome:
With this implementation, the EventEmitter
object throws the same kind of events for Chrome events and Chrome responses: by listening the EventEmitter
object, we cannot distinguish Chrome events and Chrome responses . I understand your goal but I fear that could lead to some errors.
I would prefer to keep the distinction between Chrome events and Chrome responses: I will propose some changes in this direction.
It was my understanding that only commands have id. These lines are just emitting the event corresponding to the command sent. Lines after are responding the same way but to method. What difference would like to have between those two?
What do you think of that?
I used many events from the chrome-remote-interface
library: connect
, ready
...
I also created new events that would be useful to implement the promises API on top of CDPSession
.
Definitely looks good ! It is fine by me. Should we merge and see how it goes from there with example and test run ?
I open this PR now in order to have a room for discussion for this branch.