Closed Bug 1591979 Opened 5 years ago Closed 4 years ago

Implement `name` property for Page.frameNavigated event object

Categories

(Remote Protocol :: CDP, task, P1)

task

Tracking

(firefox79 fixed)

RESOLVED FIXED
Firefox 79
Tracking Status
firefox79 --- fixed

People

(Reporter: whimboo, Assigned: whimboo)

References

(Blocks 1 open bug, )

Details

For the Puppeteer alpha release the name property needs to be implemented. Here the method to update:

https://searchfox.org/mozilla-central/rev/74cc0f4dce444fe0757e2a6b8307d19e4d0e0212/remote/domains/content/Page.jsm#115-126

I think the name field here is just mirroring WindowProxy.name.

Here what CDP is sending:

  1. Navigation to a site without frames (mozilla.org) - no name is being added:
  puppeteer:protocol ◀ RECV {"method":"Page.frameNavigated","params":{"frame":{"id":"B368D7EB6FB371FFFA1B3D795750ACC5","loaderId":"8B9BA6366E22653895A69F660A6D9EA8","url":"https://www.mozilla.org/en-US/","securityOrigin":"https://www.mozilla.org","mimeType":"text/html"}},"sessionId":"367CDE3684BE3A070D69307F26C12003"} +0ms
  1. Navigation to a site with frames (iframes example on MDN):
  puppeteer:protocol ◀ RECV {"method":"Page.frameNavigated","params":{"frame":{"id":"6BC7A5CB01867D4A7C111B0E9674565D","parentId":"6354A8C32B70C62617EB8A9EDDBE8D46","loaderId":"6E4AE60840FFAAA150751C282EBDF0E9","name":"inlineFrameExample","url":"https://www.openstreetmap.org/export/embed.html?bbox=-0.004017949104309083%2C51.47612752641776%2C0.00030577182769775396%2C51.478569861898606&layer=mapnik","securityOrigin":"https://www.openstreetmap.org","mimeType":"text/html"}},"sessionId":"E46199D8C6F9D3B6474C27366FA67775"} +0ms

So this is actually the id if the iframe, which is accessible via window.name as Andreas mentioned above. But to prove that we have to get bug 1593226 fixed first.

Actually the name property is not used in Puppeteer nor Gutenberg:
https://github.com/GoogleChrome/puppeteer/blob/master/lib/FrameManager.js#L232-L261

So not sure why I thought it is immediately necessary. Removing as blocker for the alpha release.

No longer blocks: puppeteer-gutenberg
Depends on: 1593226
Priority: P2 → P3
Whiteboard: [puppeteer-alpha]

I might do that as part of bug 1637640.

Depends on: 1637640

Fixed by my patch on bug 1637640.

Assignee: nobody → hskupin
Status: NEW → RESOLVED
Closed: 4 years ago
Priority: P3 → P1
Resolution: --- → FIXED
Target Milestone: --- → Firefox 79
Component: CDP: Page → CDP
You need to log in before you can comment on or make changes to this bug.