Skip to content

Commit a8420b8

Browse files
saschanazsandersn
authored andcommitted
Update comment maps (#680)
* fix comment reader * process nested list * use innerText to get formatted text * comments for dictionaries/constants * trim pharases for nested comments * move to index.ts to keep texts as intact as possible * convert inline codes as markdown * update commentmaps * do not collapse double newlines
1 parent b6b3cb9 commit a8420b8

39 files changed

+1400
-1016
lines changed

baselines/dom.generated.d.ts

Lines changed: 594 additions & 440 deletions
Large diffs are not rendered by default.

baselines/webworker.generated.d.ts

Lines changed: 307 additions & 243 deletions
Large diffs are not rendered by default.

inputfiles/idl/DOM.commentmap.json

Lines changed: 104 additions & 66 deletions
Large diffs are not rendered by default.
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
2-
"textdecoder": "Returns a new TextDecoder object.\nIf label is either not a label or is a label for replacement, throws a RangeError.",
3-
"textdecoder-encoding": "Returns encoding's name, lowercased.",
4-
"textdecoder-fatal": "Returns true if error mode is \"fatal\", and\nfalse otherwise.",
5-
"textdecoder-ignorebom": "Returns true if ignore BOM flag is set, and false\notherwise.",
6-
"textdecoder-decode": "Returns the result of running encoding's decoder.\nThe method can be invoked zero or more times with options's stream set to\ntrue, and then once without options's stream (or set to false), to process\na fragmented stream. If the invocation without options's stream (or set to\nfalse) has no input, it's clearest to omit both arguments.\nvar string = \"\", decoder = new TextDecoder(encoding), buffer;\nwhile(buffer = next_chunk()) {\nstring += decoder.decode(buffer, {stream:true});\n}\nstring += decoder.decode(); // end-of-stream\nIf the error mode is \"fatal\" and encoding's decoder returns error, throws a TypeError.",
2+
"textdecoder": "Returns a new TextDecoder object.\n\nIf label is either not a label or is a label for replacement, throws a RangeError.",
3+
"textdecodercommon-encoding": "Returns encoding's name, lowercased.",
4+
"textdecodercommon-fatal": "Returns true if error mode is \"fatal\", and false otherwise.",
5+
"textdecodercommon-ignorebom": "Returns true if ignore BOM flag is set, and false otherwise.",
6+
"textdecoder-decode": "Returns the result of running encoding's decoder. The method can be invoked zero or more times with options's stream set to true, and then once without options's stream (or set to false), to process a fragmented stream. If the invocation without options's stream (or set to false) has no input, it's clearest to omit both arguments.\n\n```\nvar string = \"\", decoder = new TextDecoder(encoding), buffer;\nwhile(buffer = next_chunk()) {\n string += decoder.decode(buffer, {stream:true});\n}\nstring += decoder.decode(); // end-of-stream\n```\n\nIf the error mode is \"fatal\" and encoding's decoder returns error, throws a TypeError.",
77
"textencoder": "Returns a new TextEncoder object.",
8-
"textencoder-encoding": "Returns \"utf-8\".",
8+
"textencodercommon-encoding": "Returns \"utf-8\".",
99
"textencoder-encode": "Returns the result of running UTF-8's encoder.",
1010
"textencoder-encodeinto": "Runs the UTF-8 encoder on source, stores the result of that operation into destination, and returns the progress made as a dictionary whereby read is the number of converted code units of source and written is the number of bytes modified in destination.",
11-
"textdecoderstream": "Returns a new TextDecoderStream object.\nIf label is either not a label or is a label for replacement, throws a RangeError.",
12-
"generictransformstream-writable": "Returns a writable stream which accepts string chunks and runs them through UTF-8's encoder before making them available to readable.\nTypically this will be used via the pipeThrough() method on a ReadableStream source.\ntextReadable\n.pipeThrough(new TextEncoderStream())\n.pipeTo(byteWritable);",
11+
"textdecoderstream": "Returns a new TextDecoderStream object.\n\nIf label is either not a label or is a label for replacement, throws a RangeError.",
12+
"generictransformstream-readable": "Returns a readable stream whose chunks are strings resulting from running encoding's decoder on the chunks written to writable.",
13+
"generictransformstream-writable": "Returns a writable stream which accepts BufferSource chunks and runs them through encoding's decoder before making them available to readable.\n\nTypically this will be used via the pipeThrough() method on a ReadableStream source.\n\n```\nvar decoder = new TextDecoderStream(encoding);\nbyteReadable\n .pipeThrough(decoder)\n .pipeTo(textWritable);\n```\n\nIf the error mode is \"fatal\" and encoding's decoder returns error, both readable and writable will be errored with a TypeError.",
1314
"textencoderstream": "Returns a new TextEncoderStream object."
1415
}

inputfiles/idl/Fetch.commentmap.json

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,31 @@
11
{
2+
"request": "Returns a new request whose url property is input if input is a string, and input's url if input is a Request object.\n\nThe init argument is an object whose properties can be set as follows:",
23
"request-method": "Returns request's HTTP method, which is \"GET\" by default.",
34
"request-url": "Returns the URL of request as a string.",
4-
"request-headers": "Returns a Headers object consisting of the headers associated with request.\nNote that headers added in the network layer by the user agent will not be accounted for in this\nobject, e.g., the \"Host\" header.",
5-
"request-destination": "Returns the kind of resource requested by request, e.g., \"document\" or\n\"script\".",
6-
"request-referrer": "Returns the referrer of request. Its value can be a same-origin URL if\nexplicitly set in init, the empty string to indicate no referrer, and\n\"about:client\" when defaulting to the global's default. This is used during\nfetching to determine the value of the `Referer` header of the request being made.",
7-
"request-referrerpolicy": "Returns the referrer policy associated with request. This is used during\nfetching to compute the value of the request's referrer.",
8-
"request-mode": "Returns the mode associated with request, which is a string indicating\nwhether the request will use CORS, or will be restricted to same-origin URLs.",
9-
"request-credentials": "Returns the credentials mode associated with request, which is a string\nindicating whether credentials will be sent with the request always, never, or only when sent to a\nsame-origin URL.",
10-
"request-cache": "Returns the cache mode associated with request, which is a string indicating\nhow the request will interact with the browser's cache when fetching.",
11-
"request-redirect": "Returns the redirect mode associated with request, which is a string\nindicating how redirects for the request will be handled during fetching. A request will follow redirects by default.",
12-
"request-integrity": "Returns request's subresource integrity metadata, which is a cryptographic hash of\nthe resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]",
13-
"request-keepalive": "Returns a boolean indicating whether or not request can outlive the global in which\nit was created.",
5+
"request-headers": "Returns a Headers object consisting of the headers associated with request. Note that headers added in the network layer by the user agent will not be accounted for in this object, e.g., the \"Host\" header.",
6+
"request-destination": "Returns the kind of resource requested by request, e.g., \"document\" or \"script\".",
7+
"request-referrer": "Returns the referrer of request. Its value can be a same-origin URL if explicitly set in init, the empty string to indicate no referrer, and \"about:client\" when defaulting to the global's default. This is used during fetching to determine the value of the `Referer` header of the request being made.",
8+
"request-referrerpolicy": "Returns the referrer policy associated with request. This is used during fetching to compute the value of the request's referrer.",
9+
"request-mode": "Returns the mode associated with request, which is a string indicating whether the request will use CORS, or will be restricted to same-origin URLs.",
10+
"request-credentials": "Returns the credentials mode associated with request, which is a string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL.",
11+
"request-cache": "Returns the cache mode associated with request, which is a string indicating how the request will interact with the browser's cache when fetching.",
12+
"request-redirect": "Returns the redirect mode associated with request, which is a string indicating how redirects for the request will be handled during fetching. A request will follow redirects by default.",
13+
"request-integrity": "Returns request's subresource integrity metadata, which is a cryptographic hash of the resource being fetched. Its value consists of multiple hashes separated by whitespace. [SRI]",
14+
"request-keepalive": "Returns a boolean indicating whether or not request can outlive the global in which it was created.",
1415
"request-isreloadnavigation": "Returns a boolean indicating whether or not request is for a reload navigation.",
15-
"request-ishistorynavigation": "Returns a boolean indicating whether or not request is for a history\nnavigation (a.k.a. back-foward navigation).",
16-
"request-signal": "Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort\nevent handler."
16+
"request-ishistorynavigation": "Returns a boolean indicating whether or not request is for a history navigation (a.k.a. back-foward navigation).",
17+
"request-signal": "Returns the signal associated with request, which is an AbortSignal object indicating whether or not request has been aborted, and its abort event handler.",
18+
"requestinit-method": "A string to set request's method.",
19+
"requestinit-headers": "A Headers object, an object literal, or an array of two-item arrays to set request's headers.",
20+
"requestinit-body": "A BodyInit object or null to set request's body.",
21+
"requestinit-referrer": "A string whose value is a same-origin URL, \"about:client\", or the empty string, to set request's referrer.",
22+
"requestinit-referrerpolicy": "A referrer policy to set request's referrerPolicy.",
23+
"requestinit-mode": "A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.",
24+
"requestinit-credentials": "A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.",
25+
"requestinit-cache": "A string indicating how the request will interact with the browser's cache to set request's cache.",
26+
"requestinit-redirect": "A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.",
27+
"requestinit-integrity": "A cryptographic hash of the resource to be fetched by request. Sets request's integrity.",
28+
"requestinit-keepalive": "A boolean to set request's keepalive.",
29+
"requestinit-signal": "An AbortSignal to set request's signal.",
30+
"requestinit-window": "Can only be null. Used to disassociate request from any Window."
1731
}
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"element-requestfullscreen": "Displays element fullscreen and resolves promise when done.\nWhen supplied, options's navigationUI member indicates whether showing\nnavigation UI while in fullscreen is preferred or not. If set to \"show\", navigation\nsimplicity is preferred over screen space, and if set to \"hide\", more screen space\nis preferred. User agents are always free to honor user preference over the application's. The\ndefault value \"auto\" indicates no application preference.",
3-
"document-fullscreenenabled": "Returns true if document has the ability to display elements fullscreen\nand fullscreen is supported, or false otherwise.",
4-
"document-exitfullscreen": "Stops document's fullscreen element from being displayed fullscreen and\nresolves promise when done.",
5-
"document-fullscreenelement": "Returns shadowroot's fullscreen element."
2+
"element-requestfullscreen": "Displays element fullscreen and resolves promise when done.\n\nWhen supplied, options's navigationUI member indicates whether showing navigation UI while in fullscreen is preferred or not. If set to \"show\", navigation simplicity is preferred over screen space, and if set to \"hide\", more screen space is preferred. User agents are always free to honor user preference over the application's. The default value \"auto\" indicates no application preference.",
3+
"document-fullscreenenabled": "Returns true if document has the ability to display elements fullscreen and fullscreen is supported, or false otherwise.",
4+
"document-exitfullscreen": "Stops document's fullscreen element from being displayed fullscreen and resolves promise when done.",
5+
"documentorshadowroot-fullscreenelement": "Returns document's fullscreen element."
66
}

0 commit comments

Comments
 (0)