8000 chore: various v1.48.0 roll fixes for .NET (#33096) · microsoft/playwright@9fcf604 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9fcf604

Browse files
authored
chore: various v1.48.0 roll fixes for .NET (#33096)
1 parent 4c2d62a commit 9fcf604

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

docs/src/api/class-websocketroute.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,19 +256,25 @@ By default, closing one side of the connection, either in the page or on the ser
256256
### param: WebSocketRoute.onClose.handler
257257
* since: v1.48
258258
* langs: js, python
259-
- `handler` <[function]\([number]|[undefined], [string]|[undefined]\): [Promise<any>|any]>
259+
- `handler` <[function]\([int]|[undefined], [string]|[undefined]\): [Promise<any>|any]>
260260

261261
Function that will handle WebSocket closure. Received an optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
262262

263263
### param: WebSocketRoute.onClose.handler
264264
* since: v1.48
265-
* langs: java, csharp
266-
- `handler` <[function]\([null]|[number], [null]|[string]\)>
265+
* langs: java
266+
- `handler` <[function]\([null]|[int], [null]|[string]\)>
267267

268268
Function that will handle WebSocket closure. Received an optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
269269

270+
### param: WebSocketRoute.onClose.handler
271+
* since: v1.48
272+
* langs: csharp
273+
- `handler` <[function]\([int?], [string]\)>
274+
275+
Function that will handle WebSocket closure. Received an optional [close code](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#code) and an optional [close reason](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close#reason).
270276

271-
## async method: WebSocketRoute.onMessage
277+
## method: WebSocketRoute.onMessage
272278
* since: v1.48
273279

274280
This method allows to handle messages that are sent by the WebSocket, either from the page or from the server.

docs/src/api/params.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ Target URL.
363363

364364
## js-fetch-option-params
365365
* langs: js
366-
- `params` <[Object]<[string], [string]|[number]|[boolean]>|[URLSearchParams]|[string]>
366+
- `params` <[Object]<[string], [string]|[float]|[boolean]>|[URLSearchParams]|[string]>
367367

368368
Query parameters to be sent with the URL.
369369

utils/doclint/dotnetXmlDocumentation.js

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
// @ts-check
1818
const Documentation = require('./documentation');
19-
const { visitAll } = require 8000 ('../markdown');
19+
const { visitAll, render } = require('../markdown');
2020
/**
2121
* @param {Documentation.MarkdownNode[]} nodes
2222
* @param {number} maxColumns
@@ -64,7 +64,10 @@ function _innerRenderNodes(nodes, maxColumns = 80, wrapParagraphs = true) {
6464
} else if (node.type === 'li') {
6565
_wrapInNode('item><description', _wrapAndEscape(node, maxColumns), summary, '/description></item');
6666
} else if (node.type === 'note') {
67-
_wrapInNode('para', _wrapAndEscape(node, maxColumns), remarks);
67+
_wrapInNode('para', _wrapAndEscape({
68+
type: 'text',
69+
text: render(node.children ?? []).replaceAll('\n', '↵'),
70+
}, maxColumns), remarks);
6871
}
6972
lastNode = node;
7073
});
@@ -75,11 +78,11 @@ function _innerRenderNodes(nodes, maxColumns = 80, wrapParagraphs = true) {
7578

7679
function _wrapCode(lines) {
7780
let i = 0;
78-
let out = [];
81+
const out = [];
7982
for (let line of lines) {
8083
line = line.replace(/[&]/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;');
8184
if (i < lines.length - 1)
82-
line = line + "<br/>";
85+
line = line + '<br/>';
8386
out.push(line);
8487
i++;
8588
}
@@ -163,4 +166,4 @@ function renderTextOnly(nodes, maxColumns = 80) {
163166
return result.summary;
164167
}
165168

166-
module.exports = { renderXmlDoc, renderTextOnly }
169+
module.exports = { renderXmlDoc, renderTextOnly };

utils/doclint/generateDotnetApi.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,8 @@ function renderMethod(member, parent, name, options, out) {
520520
&& !name.startsWith('Get')
521521
&& name !== 'CreateFormData'
522522
&& !name.startsWith('PostDataJSON')
523-
&& !name.startsWith('As')) {
523+
&& !name.startsWith('As')
524+
&& name !== 'ConnectToServer') {
524525
if (!member.async) {
525526
if (member.spec && !options.nodocs)
526527
out.push(...XmlDoc.renderXmlDoc(member.spec, maxDocumentationColumnWidth));
@@ -718,7 +719,7 @@ function translateType(type, parent, generateNameCallback = t => t.name, optiona
718719
if (type.expression === '[null]|[Error]')
719720
return 'void';
720721

721-
if (type.name == 'Promise' && type.templates?.[0].name === 'any')
722+
if (type.name === 'Promise' && type.templates?.[0].name === 'any')
722723
return 'Task';
723724

724725
if (type.union) {

0 commit comments

Comments
 (0)
0