Skip to content

docs(api): extract repeated alias structures into params.md mixins#40654

Open
pavelfeldman wants to merge 1 commit intomicrosoft:mainfrom
pavelfeldman:docs-extract-alias-mixins
Open

docs(api): extract repeated alias structures into params.md mixins#40654
pavelfeldman wants to merge 1 commit intomicrosoft:mainfrom
pavelfeldman:docs-extract-alias-mixins

Conversation

@pavelfeldman
Copy link
Copy Markdown
Member

Summary

  • Extract three structures with identical sub-fields and identical aliases that were duplicated across class docs into params.md mixins:
    • return-headers-array — used by APIResponse.headersArray, Request.headersArray, Response.headersArray (csharp:Header, java:HttpHeader)
    • expose-binding-callback — used by BrowserContext.exposeBinding, Page.exposeBinding (java:BindingCallback)
    • expose-function-callback — used by BrowserContext.exposeFunction, Page.exposeFunction (java:FunctionCallback)
  • Page.exposeFunction.callback wording is normalized to match BrowserContext.exposeFunction.callback (equivalent meaning, slightly different wording).

Several object-type structures with identical sub-fields and identical
language aliases were duplicated across class docs. Extract them as
mixins in `params.md`:

- `return-headers-array` (csharp:Header, java:HttpHeader)
  used by APIResponse.headersArray, Request.headersArray,
  Response.headersArray
- `expose-binding-callback` (java:BindingCallback)
  used by BrowserContext.exposeBinding, Page.exposeBinding
- `expose-function-callback` (java:FunctionCallback)
  used by BrowserContext.exposeFunction, Page.exposeFunction
- `file-payload-fields` (csharp:FilePayload, java:FilePayload)
  used by FormData.append.value (default+csharp), FormData.set.value
  (default+csharp), and the existing input-files mixin

To support nested-struct extraction (FilePayload lives inside another
type's `value` parameter), extend the mixin substitution in
api_parser.js to also work on li nodes.

Page.exposeFunction.callback wording is normalized to match
BrowserContext.exposeFunction.callback (equivalent meaning, slightly
different wording).
@pavelfeldman pavelfeldman force-pushed the docs-extract-alias-mixins branch from 82749d2 to 1d73527 Compare May 6, 2026 00:27
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Test results for "MCP"

1 failed
❌ [webkit] › mcp/dashboard.spec.ts:332 › should cancel browser_annotate when the MCP client disconnects @mcp-windows-latest-webkit

6942 passed, 1052 skipped


Merge workflow run.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 6, 2026

Test results for "tests 1"

1 failed
❌ [firefox-page] › page/page-emulate-media.spec.ts:196 › should report hover and fine pointer for desktop @firefox-ubuntu-22.04-node20

1 flaky ⚠️ [chromium-library] › library/video.spec.ts:275 › screencast › should capture navigation `@chromium-ubuntu-22.04-node24`

41653 passed, 851 skipped


Merge workflow run.

Comment thread docs/src/api/params.md
## drop-payload
- `payload` <[Object]>
- alias: DropPayload
- `files` ?<[path]|[Array]<[path]>|[Object]|[Array]<[Object]>>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about this type?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants