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

Unnecessary / Inconsistent use of window. #27666

Open
blindman67 opened this issue Jun 29, 2023 · 1 comment
Open

Unnecessary / Inconsistent use of window. #27666

blindman67 opened this issue Jun 29, 2023 · 1 comment
Labels
Content:WebAPI Web API docs needs decision The task needs consensus through discussion

Comments

@blindman67
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations

What specific section or headline is this issue about?

First two code examples

What information was incorrect, unhelpful, or incomplete?

The calls to
window.requestAnimationFrame(draw);

in the first sample and
window.requestAnimationFrame(clock);

in the second sample inconsistently use the window reference when using DOM API's

What did you expect to see?

I expected not to see the reference to window
requestAnimationFrame(draw);
and
requestAnimationFrame(clock);
in the second sample

Do you have any supporting links, references, or citations?

The last sample is consistent with the implied use of window.

It shows consistent reference via implied window as follows requestAnimationFrame(anim)

As do all samples showing implied window reference for document rather than window.document

Do you have anything more you want to share?

Maybe a second issue? The first sample uses Date to get a time to used to animate content rather than use the time parameter (not defined in the sample) passed to the requestAnimationFrame callback.

MDN metadata

Page report details
@blindman67 blindman67 added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 29, 2023
@github-actions github-actions bot added the Content:WebAPI Web API docs label Jun 29, 2023
@sideshowbarker sideshowbarker removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jul 4, 2023
@Josh-Cena
Copy link
Member

@Josh-Cena Josh-Cena added the needs decision The task needs consensus through discussion label Jul 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs needs decision The task needs consensus through discussion
Projects
None yet
Development

No branches or pull requests

3 participants