content icon indicating copy to clipboard operation
content copied to clipboard

lexical `this` is mentioned but the associated example doesn't demonstrate it

Open ghost opened this issue 8 months ago • 1 comments

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval

What specific section or headline is this issue about?

#functions_are_called_with_the_global_this

What information was incorrect, unhelpful, or incomplete?

This text:

You can use arrow functions to adopt the this of the function in which setTimeout() is called (arrow functions have a lexical this).

You can test this with the following code.

is followed by an example that doesn't demonstrate what's claimed. It does work around the problem the section is talking about, but the arrow functions in the example could be replaced with function expressions and the behavior wouldn't change, because lexical this isn't used.

What did you expect to see?

Either the text shouldn't imply the example uses a special feature of arrow functions, or the example should demonstrate that feature.

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

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
  • Folder: en-us/web/api/window/setinterval
  • MDN URL: https://developer.mozilla.org/en-US/docs/Web/API/Window/setInterval
  • GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/api/window/setinterval/index.md
  • Last commit: https://github.com/mdn/content/commit/21ed9a1338b207e8a39064583c19d9f720235235
  • Document last modified: 2025-12-30T02:28:58.000Z

ghost avatar Mar 14 '26 17:03 ghost

Again, this is because they took my experimental work without consulting or citing so they are still figuring out how it all works. Coulda saved a lot of time and money if they just asked. I'm still seeding bad broken contradictory code snippets btw, it gets easier and easier to spot this illicit activity by the PR. Not just MDN either. It all comes back to @tunetheweb and his croneys

ahfuckit avatar Mar 22 '26 03:03 ahfuckit