Closed Bug 1602083 Opened 4 years ago Closed 2 months ago

Emit executionContextCreated for all contexts that exist when Runtime gets enabled


(Remote Protocol :: CDP, enhancement, P2)



(Not tracked)



(Reporter: impossibus, Unassigned)



(Whiteboard: [puppeteer-beta2-mvp]) "When the reporting gets enabled the event will be sent immediately for each existing execution context." implying that contexts get created regardless of whether Runtime is enabled or not; "enabled" just means notifications are being sent.

So in Runtime.enabled we should iterate over contexts and emit an executionContextCreated event for all the contexts that already exist.

This is especially relevant to methods like Page.createIsolatedWorld and Page.addScriptToEvaluateOnNewDocument, since they create new execution contexts in addition to what Runtime does.

Related to this, I think this also implies that we need to move the turning on/off of the context observer for context-created and context-destroyed out of Runtime. Contexts should be destroyed/created regardless of whether the Runtime domain is instantiated or not.

Priority: P3 → P2
Whiteboard: [lang=js] → [puppeteer-beta-mvp] [lang=js]
Whiteboard: [puppeteer-beta-mvp] [lang=js] → [puppeteer-beta-reserve]
Priority: P2 → P3
Whiteboard: [puppeteer-beta-reserve] → [puppeteer-beta-reserve][lang=js]

This is blocked by bug 1623482 and cannot be mentored at the moment.

Mentor: mjzffr
Whiteboard: [puppeteer-beta-reserve][lang=js] → [puppeteer-beta-reserve]

This seems to be important for clients.

Priority: P3 → P2
Whiteboard: [puppeteer-beta-reserve] → [puppeteer-beta2-mvp]
Component: CDP: Runtime → CDP
Severity: normal → S3

We are not going to implement this. One should use WebDriver BiDi these days.

Closed: 2 months ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.