Add completion for dictionary fields
Categories
(DevTools :: Console, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: ErichDonGubler, Unassigned)
References
(Depends on 1 open bug)
Details
As a user who develops web application in Firefox and doesn't have intimate familiarity with each JS API of the Web platform I'd like to use, completion for IDL-defined types would help me write JS confidently in the console.
To give an example that I'm partial to (😛), if one were to use the GPUDevice.createShaderModule API from WebGPU to compile a shader, I might misremember the name of the code field in the first argument object as, say, sourceCode. If I received assistance that offered the correct field name the first time, I can avoid trial-and-error that might force me to reload the page (continuing the example, if I tried const module = device.createShaderModule({ sourceCode: … }), I cannot simply correct the field name, because the module identifier is already assigned as a const).
| Reporter | ||
Comment 1•1 year ago
|
||
I don't know how union types could be represented here, but I suspect there's a lot that can be learned from completion in the TypeScript ecosystem.
| Reporter | ||
Comment 2•1 year ago
|
||
I wasn't able to find an old issue that seemed to fit this. I'd be surprised if this hadn't been discussed before with the Console implementation, though.
Comment 3•1 year ago
|
||
Supporting a way to give a hint about the expected arguments (Bug 1657350) would be probably useful in most cases, but after that improving the autocomplete sounds like a good next step.
Description
•