Closed
Bug 868507
Opened 12 years ago
Closed 10 years ago
Remove `for each` usage from Add-on SDK documentation example
Categories
(Add-on SDK Graveyard :: Documentation, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: zer0, Assigned: xrsquared)
References
Details
The `for each` statement is considered deprecated (see: https://developer.mozilla.org/en-US/docs/JavaScript/Reference/Statements/for_each...in), we should stop to use it our documentation.
Priority: -- → P3
Reporter | ||
Comment 1•12 years ago
|
||
As Irakli noted here:
https://github.com/mozilla/addon-sdk/pull/986#issuecomment-17865084
We should also recomend `for…of` in our docs.
Updated•11 years ago
|
Whiteboard: [good first bug]
http://mxr.mozilla.org/mozilla-central/search?string=for+each%28&find=%2Faddon-sdk%2F&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central
http://mxr.mozilla.org/mozilla-central/search?string=for+each+%28&find=%2Faddon-sdk%2F&findi=&filter=^[^\0]*%24&hitlimit=&tree=mozilla-central
These two searches should list all of the instances of for each in the SDK codebase. This probably crosses over with what bug 866733 would fix.
Hey Alan, are you working on this one?
(In reply to Alan from comment #3)
> I would like to attempt this as my first bug.
(In reply to yt from comment #4)
> Hey Alan, are you working on this one?
> (In reply to Alan from comment #3)
> > I would like to attempt this as my first bug.
No, I was not assigned. Feel free to work on it :).
(In reply to Alan from comment #5)
> No, I was not assigned. Feel free to work on it :).
Hey, I don't think you need to be assigned to it to work on it. In fact, I was under the impression that first-timers needed to submit something before a bug gets assigned to them. Go ahead and work on it if you want! If you don't want to, I'll check into it, but you should. I'm a beginner myself so I can't mentor you or anything but I've worked on a couple sdk bugs so if you wanna chat email me or look me up in irc (yt).
Also, if you'd like a mentor just ask for one or flag 'need more info' at the bottom and someone will help.
Cool, thanks for the insight! I asked someone on irc about this and I didn't really got an answer as to how the system works. I just assume that I was on hold, and forgot about it.
Regardless, I will work on this and should get it done in a couple of days.
(In reply to yt from comment #6)
> (In reply to Alan from comment #5)
> > No, I was not assigned. Feel free to work on it :).
>
> Hey, I don't think you need to be assigned to it to work on it. In fact, I
> was under the impression that first-timers needed to submit something before
> a bug gets assigned to them. Go ahead and work on it if you want! If you
> don't want to, I'll check into it, but you should. I'm a beginner myself so
> I can't mentor you or anything but I've worked on a couple sdk bugs so if
> you wanna chat email me or look me up in irc (yt).
> Also, if you'd like a mentor just ask for one or flag 'need more info' at
> the bottom and someone will help.
I made changes to the following MDN pages:
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/tabs
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/windows
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/page-mod
https://developer.mozilla.org/en-US/Add-ons/SDK/Tutorials/List_Open_Tabs
I found these pages by searching on Google with:
site:developer.mozilla.org inurl:sdk for each var
It's possible that I missed some pages. If I did, please tell me.
Flags: needinfo?(zer0)
Reporter | ||
Comment 9•10 years ago
|
||
Alan, this looks good to me.
Will, do you know in case, a way to double check which SDK documentation page in mdn, contains `for each` in the examples, other than Google? Thanks!
Flags: needinfo?(zer0) → needinfo?(wbamberg)
Reporter | ||
Comment 10•10 years ago
|
||
I also want to point out that thanks to your change, Alan, people learned something new: http://stackoverflow.com/questions/26525695/javascript-of-keyword ;)
Comment 11•10 years ago
|
||
(In reply to Matteo Ferretti [:matteo] [:zer0] from comment #9)
> Alan, this looks good to me.
> Will, do you know in case, a way to double check which SDK documentation
> page in mdn, contains `for each` in the examples, other than Google? Thanks!
No - well, MDN has its own search function of course, but I don't know of a better way than search.
(In reply to Matteo Ferretti [:matteo] [:zer0] from comment #10)
> I also want to point out that thanks to your change, Alan, people learned
> something new:
> http://stackoverflow.com/questions/26525695/javascript-of-keyword ;)
Nice!
Flags: needinfo?(wbamberg)
Reporter | ||
Comment 12•10 years ago
|
||
Then, I'm marking the bug as resolved. Thanks Alan!
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Updated•10 years ago
|
Assignee: nobody → xrsquared
Whiteboard: [good first bug]
You need to log in
before you can comment on or make changes to this bug.
Description
•