Opened on 01/16/2017 at 04:40:56 AM

Closed on 03/02/2017 at 07:15:27 PM

#4801 closed change (duplicate)

Use modern JavaScript syntax throughout adblockplusui

Reported by: kzar Assignee:
Priority: Unknown Milestone:
Module: User-Interface Keywords:
Cc: sebastian, greiner Blocked By:
Blocking: Platform: Unknown / Cross platform
Ready: no Confidential: no
Tester: Unknown Verified working: no
Review URL(s):



With the messageResponder.js changes #4783 we updated that file to use more modern JavaScript syntax. We're also updating the syntax used throughout the adblockpluschrome repository #4795. For consistency we should do the same with the rest of the adblockplusui code.

What to change

Where possible:

  • Replace anonymous functions with arrow functions.
  • Replace var variable definitions with let ones.
  • Replace for i = 0; i < whatever.length with for ... of whatever.
  • Ensure method definitions use the new syntax. (E.g. {foo: function(bar) { }} becomes {foo(bar) { }}.
  • Replace IIFEs with a simple block. (E.g. (function(global) { ... })(window) becomes { ... }.
  • Ensure that "use strict"; is used throughout.

Attachments (0)

Change History (1)

comment:1 Changed on 03/02/2017 at 07:15:27 PM by greiner

  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #4871

Add Comment

Modify Ticket

Change Properties
as closed .
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from (none).
Note: See TracTickets for help on using tickets.