Closed
Bug 1204224
Opened 10 years ago
Closed 5 years ago
Unclear explanation in "Working With Objects" tutorial
Categories
(Developer Documentation Graveyard :: JavaScript, defect, P3)
Developer Documentation Graveyard
JavaScript
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: emmecinque, Assigned: fs)
Details
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150826185640
Steps to reproduce:
The page titled "Working with Objects" (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects) has a section called "Using this for object references". That section immediately follows a couple sections about defining prototype properties and defining methods.
Actual results:
The "Using this" section deviates from the theme of examples in the prior sections, employing old-style event handling as the heart of its examples. No mention is made of the fact that the browser runtime environment is responsible for ensuring that "this" is set to refer to the DOM node when the handler is invoked. Even if that were mentioned, it's a jarringly strange way to present the topic in the context of most everything else in that tutorial.
Expected results:
Since the previous section discussed creating object methods, the "Using this" section (whose title should also be improved in the process) should discuss the use of "this" in methods invoked via object references. There's no need to bring the DOM into the discussion at all.
Comment 1•10 years ago
|
||
Any update on this ticket?
Updated•6 years ago
|
Assignee: nobody → fscholz
Priority: -- → P3
Hi, I have added a new example which uses objects compared to DOM elements. I hope this is more helpful and like you wanted.
https://wiki.developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects$compare?locale=en-US&to=1592602&from=1567021
Flags: needinfo?(fscholz)
Comment 4•5 years ago
|
||
I'll let Florian review this (already ni'ed); this page is in the regular JavaScript Guide.
Flags: needinfo?(cmills)
Comment 5•5 years ago
|
||
MDN Web Docs' bug reporting has now moved to GitHub. From now on, please file content bugs at https://github.com/mdn/sprints/issues/ and platform bugs at https://github.com/mdn/kuma/issues/.
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → WONTFIX
| Assignee | ||
Updated•5 years ago
|
Flags: needinfo?(fscholz)
You need to log in
before you can comment on or make changes to this bug.
Description
•