Skip to content
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

Issue with "Document.cookie": In examples #5, #6 shouldn't it be "ES2015" instead of "ES2016" ? #4912

Closed
ddziara opened this issue May 11, 2021 · 10 comments
Labels
Content:WebAPI Web API docs

Comments

@ddziara
Copy link
Contributor

ddziara commented May 11, 2021

MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie

What information was incorrect, unhelpful, or incomplete?

Specific section or headline?

What did you expect to see?

Did you test this? If so, how?

MDN Content page report details
@ddziara ddziara changed the title Issue with "Document.cookie": In examples #5, #6 shouldn't it be "ES215" instead of "ES2016" ? Issue with "Document.cookie": In examples #5, #6 shouldn't it be "ES2015" instead of "ES2016" ? May 11, 2021
@Blakelist7
Copy link
Contributor

@ddziara I think we refer ES2016 as ES7, ES2015 as ES6 and ES5 for 2009 one
so you might be right. Let's ask @hamishwillee about it.

@hamishwillee
Copy link
Collaborator

hamishwillee commented May 17, 2021

MDN uses official names (so ES2015 for ES6, and ES2016 as ES7).

But the question was whether this should be "ES2015" instead of "ES2016".
Depends why you think it should be ES2015? If it is because of the use of arrow functions and startsWith then you'd be right.

However perhaps there is something else about this example which makes it ES2016. I don't think so but I'm not sufficiently expert to be sure. Which is why I didn't assign to me :-)

@Blakelist7
Copy link
Contributor

Blakelist7 commented May 17, 2021

Yeah I was assuming it to be "ES2015" because of arrow functions. I'll do some more research on it .
@peterbe could you take time to explain why is it ES2016 and not ES2015?
Thanks in advance

@Rumyra Rumyra added the Content:WebAPI Web API docs label May 19, 2021
@peterbe
Copy link
Contributor

peterbe commented May 20, 2021

Yeah I was assuming it to be "ES2015" because of arrow functions. I'll do some more research on it .
@peterbe could you take time to explain why is it ES2016 and not ES2015?
Thanks in advance

I can't speak to that. It's a content issue.

However, I see that there are flaws in the live samples in that it assumes that .find() always returns something.

@Blakelist7
Copy link
Contributor

@Blakelist7
Copy link
Contributor

Yeah I was assuming it to be "ES2015" because of arrow functions. I'll do some more research on it .
@peterbe could you take time to explain why is it ES2016 and not ES2015?
Thanks in advance

I can't speak to that. It's a content issue.

However, I see that there are flaws in the live samples in that it assumes that .find() always returns something.

As per my knowledge it returns undefined if no value satisfies the condition.

@hamishwillee
Copy link
Collaborator

So use of ES2016 is correct for example 6 because it uses includes, as @Blakelist7 refers to in #4912 (comment)

I wonder if to avoid this coming up again we should add a note? e.g. //ES2016 to //ES2016 (uses includes() introduced in ES2016)

example 5 might still be ES2015 - I don't see anything there introduced later.

@Blakelist7
Copy link
Contributor

Blakelist7 commented May 25, 2021

Thanks @hamishwillee for looking into the issue. Adding a note is a great idea.
Along side we could also correct example 5 .
Shall I create a PR ?

Blakelist7 added a commit to Blakelist7/content that referenced this issue May 26, 2021
Example mdn#5, #6 in `Document.cookie`

Signed-off-by: Kanwal Singh <[email protected]>

fixes: mdn#4912
Blakelist7 added a commit to Blakelist7/content that referenced this issue May 26, 2021
Example: 5, 6 in `Document.cookie`

Signed-off-by: Kanwal Singh <[email protected]>

fixes: mdn#4912
@Blakelist7
Copy link
Contributor

@ddziara we can close this issue. As this example has been removed as per #5031.

@sideshowbarker
Copy link
Collaborator

Closing per #4912 (comment)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants