Bug Tracker

Modify

Ticket #10819 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

Eliminate "this.on.call(this, "

Reported by: anonymous Owned by: rwaldron
Priority: low Milestone: 1.7.2
Component: event Version: git
Keywords: Cc:
Blocking: Blocked by:

Description

one: function( types, selector, data, fn ) {
    return this.on.call( this, types, selector, data, fn, 1 );
},

can be simplified to:

one: function( types, selector, data, fn ) {
    return this.on( types, selector, data, fn, 1 );
},

since the this value is determined implicitly. Eliminating the extraneous .call(this, saves 10 bytes from the minified file.

Change History

comment:1 Changed 2 years ago by rwaldron

  • Owner set to rwaldron
  • Priority changed from undecided to low
  • Status changed from new to assigned
  • Component changed from unfiled to event
  • Milestone changed from None to 1.next

comment:2 Changed 2 years ago by Rick Waldron

  • Status changed from assigned to closed
  • Resolution set to fixed

Remove unnec .call( this... from one: function() {}. Fixes #10819

Changeset: 64df670a81e70fdece1049129523bb2ad1bc2858

comment:3 Changed 2 years ago by dmethvin

  • Milestone changed from 1.next to 1.7.2

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.