-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add traverse script #4120
Add traverse script #4120
Conversation
This is really cool and helps getting lists of things to work on for our year goal. I wonder if we want to add a |
Oh yeah, that's a really good point, haha! That also makes me think that maybe the |
The code looks good! |
You actually brought up a really good point! I thought that you could just comma-separate it, as that what everyone's saying, but apparently that only works for optional arguments, not positional ones. So, that unfortunately leaves a tiny bit of work for us to do. Comma separation seems to be the most common method, so I'm setting it up to act as such! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comma separation works for me and feels natural with this positional approach. (I was thinking we might need to change to use named arguments or so, but this is fine with me). Now we just need to make sure we work with proper strings throughout.
Co-Authored-By: Florian Scholz <fscholz@mozilla.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is really cool now. I can use it to also query things that will ship in Firefox this month, for example.
npm run traverse firefox api,css,html,http,javascript 67
api.EXT_float_blend
api.InputEvent.data
api.InputEvent.dataTransfer
api.InputEvent.inputType.insertFromPasteAsQuotation
api.Notification.secure_context_required
api.OES_fbo_render_mipmap
api.RTCIceCandidate.usernameFragment
api.RTCIceCandidateInit.usernameFragment
api.WorkerGlobalScope.importScripts.mime_checks
css.at-rules.media.prefers-color-scheme
css.properties.-moz-binding
css.properties.word-break.break-word
css.types.global_keywords.revert
html.elements.iframe.external_protocol_urls_blocked
html.global_attributes.autocomplete.new-password
http.headers.Feature-Policy.display-capture
javascript.builtins.RegExp.@@matchAll
javascript.builtins.String.matchAll
javascript.builtins.Symbol.matchAll
javascript.grammar.hashbang_comments
javascript.statements.import.dynamic_import
javascript.statements.import.dynamic_import
22
The only thing that would make this better -- an option to add smarts that know how to reformat these into the form we'd use in "real life". That is, take "css.properties.word-break.break-word" and turn it into "CSS word-break: break-word" or "CSS word-break property value break-word" or something; or "api.InputEvent.dataTransfer" to "InputEvent.dataTransfer property" or whatever. |
After taking the script that @Elchi3 wrote and modifying it for easier browser/value changes, I figured I might as well add yargs into the mix and submit it as an official script. I'm certain it will benefit others as well!