-
Notifications
You must be signed in to change notification settings - Fork 30.4k
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
doc: add how to access URL constructor #21928
Conversation
It might be worth explicitly mentioning that this only applies up to Node 8, since Node 10 it’s also accessibly as a global? |
In that case, should this PR target |
The v8.x docs include the So I think this PR may be unnecessary? (Or maybe there's an issue where it's not sufficiently clear what version of the docs one is reading on the website?) |
I didn’t realize it was global, even though it does mention it in the doc. I was looking specifically for an import statement. Would it be against convention to add |
FWIW the |
BTW the v8.x docs have |
I don't think we do that anywhere else, but that doesn't mean we can't in this situation or start a general practice along those lines. /pinging @nodejs/documentation @nodejs/website for thoughts |
i thought the current practice was to treat the examples as runnable code yea? so if they reference something without require/etc it should be assumed to be a global. |
FWIW, we still have this point in the STYLE_GUIDE:
And we still have many examples with assumed |
Given the above comments, I’m closing this. If you think this should be re-opened, please let us know and we’ll be happy to do so! |
It was unclear to me how to access the constructor. This should clear things up for future users.
Checklist