Uh oh!
There was an error while loading. Please reload this page.
doc: add how to access URL constructor - #21928
Conversation
addaleax
commented
Jul 21, 2018
It might be worth explicitly mentioning that this only applies up to Node 8, since Node 10 it’s also accessibly as a global? |
Trott
commented
Jul 21, 2018
In that case, should this PR target |
Trott
commented
Jul 21, 2018
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?) |
tim-phillips
commented
Jul 21, 2018
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 |
richardlau
commented
Jul 21, 2018
FWIW the |
TimothyGu
commented
Jul 21, 2018
BTW the v8.x docs have |
Trott
commented
Jul 22, 2018
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 |
devsnek
commented
Jul 22, 2018
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 |
addaleax
commented
Sep 2, 2018
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