Bug Tracker

Modify

Ticket #7979 (closed enhancement: fixed)

Opened 2 years ago

Last modified 2 years ago

subclass enhancment

Reported by: digitalxero@… Owned by: wycats
Priority: blocker Milestone: 1.5
Component: core Version: 1.5b1
Keywords: Cc:
Blocking: Blocked by:

Description

Currently the only top level method that a jQuery subclass gets is 'subclass'. With a small patch you really get a full jQuery subclass and subclassing the subclass does what you would expect and brings over any top level methods/attributes you defined on your subclass.

Patch/Tests @  http://jsfiddle.net/mjTy6/

Change History

comment:1 Changed 2 years ago by jitter

  • Type changed from bug to enhancement
  • Component changed from unfiled to core

Thanks for taking the time to contribute to the jQuery project by writing an enhancement request.

It would be good (and give this suggestion more visibility) if you would file a pull request for this with the changes you made. If you don't know how to do this check

 http://docs.jquery.com/Getting_Involved the "Committing and Pull Requests" section and
 http://docs.jquery.com/Tips_for_jQuery_Bug_Patching

for more information

comment:2 Changed 2 years ago by digitalxero@…

comment:3 Changed 2 years ago by jitter

  • Keywords needsreview added

comment:4 Changed 2 years ago by jitter

  • Cc wycats added

comment:5 Changed 2 years ago by digitalxero@…

I would actually consider this a bug in the current subclass implementation as you are not getting a subclass of jQuery you are getting a subclass of jQuery.fn

comment:6 Changed 2 years ago by danheberden

#8077 is a duplicate of this ticket.

comment:7 Changed 2 years ago by ajpiano

  • Owner set to wycats
  • Priority changed from undecided to blocker
  • Status changed from new to assigned
  • Milestone changed from 1.next to 1.5

comment:8 Changed 2 years ago by Digitalxero

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

Make sure subclass is a proper subclass not just subclassing the fn methods. Fixes #7979.

Changeset: e00f74c43bf58132be01c6417c6126a5bc085899

comment:9 Changed 2 years ago by jitter

  • Cc wycats removed
  • Keywords needsreview removed

comment:10 Changed 2 years ago by jitter

#5880 is a duplicate of this ticket.

comment:11 Changed 2 years ago by shadedecho

I am not positive that #5880 is in fact a duplicate of this issue. Perhaps I'm misunderstanding, but please review this comment:

http://bugs.jquery.com/ticket/5880#comment:6

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.