-
Notifications
You must be signed in to change notification settings - Fork 16.2k
feat: webFrameMain.fromFrameToken #47850
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
base: main
Are you sure you want to change the base?
Conversation
Returns `WebFrameMain | undefined` - A frame with the given process and frame token, | ||
or `undefined` if there is no WebFrameMain associated with the given IDs. |
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.
Returns `WebFrameMain | undefined` - A frame with the given process and frame token, | |
or `undefined` if there is no WebFrameMain associated with the given IDs. | |
Returns `WebFrameMain | null` - A frame with the given process and frame token, | |
or `null` if there is no WebFrameMain associated with the given IDs. |
Not blocking, but we had some discussion on Slack regarding undefined
vs null
for these kinds of APIs and I think consensus was heading towards returning null
for the not found case.
### `webFrameMain.fromFrameToken(processId, frameToken)` | ||
|
||
* `processId` Integer - An `Integer` representing the internal ID of the process which owns the frame. | ||
* `frameToken` string - A `string` representing the unique frame token in the |
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.
docs: i like the additional description we have on the webFrame.findFrameByToken
API description:
Frame tokens can be retrieved from WebFrame instances (webFrame.frameToken) and can also be retrieved from WebFrameMain instances using webFrameMain.frameToken.
Description of Change
Follow up to #47616
Adds
webFrameMain.fromFrameToken(processId, frameToken)
which should be the defacto method of looking up frames based on the current chromium architecture.Checklist
npm test
passesRelease Notes
Notes: Added
webFrameMain.fromFrameToken(processId, frameToken)
to get aWebFrameMain
instance from its frame token.