TypeScript-DOM-lib-generator icon indicating copy to clipboard operation
TypeScript-DOM-lib-generator copied to clipboard

Decide what to do with comments

Open saschanaz opened this issue 4 years ago • 2 comments

Currently there are two ways to fetch comments

  1. From MDN
  2. From specs

Both are not being actively maintained. I think either one should be dropped and replaced by another one.

saschanaz avatar Aug 08 '21 16:08 saschanaz

FYI: It looks like the fetch-comment and fetch-mdn scripts are now both broken.

  • fetch-comment requires inputfiles/idlSources.json, which was removed in #1044.
  • fetch-mdn requires inputfiles/browser.webidl.preprocessed.json, which was removed in #1034.
  • fetch-mdn tries to fetch JSON files from MDN using the URL template https://developer.mozilla.org/en-US/docs/Web/API/${name}$json (where ${name} is the name of an IDL interface), but this no longer works. For example, https://developer.mozilla.org/en-US/docs/Web/API/ReadableStream$json returns HTTP 404. There doesn't seem to be an official machine-friendly API anymore... 😕 The best we can do would be processing the Markdown source files from https://github.com/mdn/content, such as https://github.com/mdn/content/blob/main/files/en-us/web/api/readablestream/index.md.

MattiasBuelens avatar Jan 03 '22 13:01 MattiasBuelens

Safari DevTools seemingly imports comments for CSS properties from somewhere, not sure it's MDN or not. I hope there's a better way since both of the previous ways were all hacky.

saschanaz avatar Jan 03 '22 13:01 saschanaz