Add support for Target.sendMessageToTarget and Target.receivedMessageFromTarget
Categories
(Remote Protocol :: CDP, enhancement, P1)
Tracking
(Not tracked)
People
(Reporter: ochameau, Assigned: ochameau)
References
(Blocks 2 open bugs)
Details
Attachments
(3 files)
Target.sendMessageToTarget
allows to send a message to a target different from the one you originally connected too when attaching to the HTTP Endpoint.
Typically, Wordpress will use puppetteer in a way where it will connect to /devtools/browser
HTTP endpoint. This actually connect to the main process target.
It will then use Target.createTarget
to open a new tab and then use Target.attachToTarget
to connect to the newly-opened tab's target.
But since they are still using Puppeteer 1.6.1 (Today's upstream version is 1.13.0), they are not using sessions as implemented in bug 1533682.
Instead, they are using Target.sendMessageToTarget
and Target.receivedMessageFromTarget
to communicate to this target while reusing the same websocket connection. Puppeteer no longer does/supports that.
We could probably help migrating WordPress to run against firefox if we don't force them to update puppeteer. But anyway, these two target methods are documented in many places and are often referenced in chrome-remote-interface as the main way to communicated to new targets. So it would probably help other integration if we implement these method and event.
Assignee | ||
Comment 1•6 years ago
|
||
Assignee | ||
Comment 2•6 years ago
|
||
A session is bound to a browsing context, not just one document.
unload
is fired when navigating to another document. The document goes
away, but not the browsing context. So, we should keep the session up and running
when the current document is destroyed and we navigate to another URL.
Depends on D25577
Updated•6 years ago
|
Assignee | ||
Comment 3•6 years ago
|
||
Depends on D25578
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/dea69b276a3f
https://hg.mozilla.org/mozilla-central/rev/d0558202539c
https://hg.mozilla.org/mozilla-central/rev/dfc8060c8b0e
Updated•4 years ago
|
Description
•