Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#2013 closed change (duplicate)

Replace "for each" loops with "for of" loops (Buildtools)

Reported by: trev Assignee: ngduonglam
Priority: P4 Milestone:
Module: Automation Keywords: goodfirstbug
Cc: Blocked By:
Blocking: Platform: Firefox
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

Description

Background

Using for each is now deprecated and shows a warning in current Firefox nightlies. We are still using it in keySelector.js. Related: #2010.

What to change

Replace all usage of for each loops in lib/keySelector.js by for .. of loops.

Attachments (1)

keySelector.js (5.7 KB) - added by ngduonglam 5 years ago.
Replaced "for each" loops with "for of" loops

Download all attachments as: .zip

Change History (9)

comment:1 Changed 5 years ago by ngduonglam

Hi - I would like to start my contribution with this one - is that ok?

comment:2 Changed 5 years ago by trev

  • Owner set to ngduonglam

Sure, feel free to fix this one. You can ask in our IRC channel if you have questions. See also https://adblockplus.org/en/contribute-code.

comment:3 Changed 5 years ago by ngduonglam

@trev: where can I find that keySelector.js in GitHub? I asked in IRC but no response :(

comment:4 Changed 5 years ago by trev

Well, it was at 4 AM on a weekend ;)

This issue is about the buildtools repository. It is a dependency of Adblock Plus for Firefox.

comment:5 Changed 5 years ago by ngduonglam

Ops - sorry, I'm in Vietnam, GMT+7 :)

Changed 5 years ago by ngduonglam

Replaced "for each" loops with "for of" loops

comment:6 Changed 5 years ago by trev

That's not a patch, not something anybody can review. You can export your commit with hg export (Mercurial) or git format-patch (Git). Also, just in case you didn't do that already, please make sure to test your changes - this code is used to select available shortcut keys in Adblock Plus for Firefox.

Last edited 5 years ago by trev (previous) (diff)

comment:7 Changed 4 years ago by sebastian

  • Blocking 312 removed
  • Resolution set to duplicate
  • Status changed from new to closed
  • Verified working unset

Duplicate of #1434.

comment:8 Changed 4 years ago by philll

  • Platform changed from Firefox/Firefox Mobile to Firefox

Made Firefox and Firefox mobile available as seperate platforms.

Note: See TracTickets for help on using tickets.