Bug Tracker

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#3127 closed enhancement (fixed)

File size optimizations for jQuery.event.special

Reported by: mike.helgeson Owned by: flesler
Priority: minor Milestone: 1.3
Component: event Version: 1.2.6
Keywords: Cc:
Blocked by: Blocking:

Description


Attachments (3)

hover[5762].diff (2.4 KB) - added by flesler 11 years ago.
My proposal (349 bytes)
hover-mike[5762].diff (2.4 KB) - added by flesler 11 years ago.
Mike's proposal (378 bytes)
enterleave_patch.js (1005 bytes) - added by mike.helgeson 11 years ago.
new hybrid from both versions

Download all attachments as: .zip

Change History (6)

Changed 11 years ago by flesler

Attachment: hover[5762].diff added

My proposal (349 bytes)

Changed 11 years ago by flesler

Attachment: hover-mike[5762].diff added

Mike's proposal (378 bytes)

comment:1 Changed 11 years ago by flesler

need: PatchCommit
Status: newassigned

Both patches include the removal of 2 needless "return;".

The amount of bytes is calculated after minifying with Dean's Packer, having the name munging option on.

My proposal is inspired on Mike's. It slightly modifies the behavior, as no special event is created for IE and the handler isn't exposed. Overall, it will work faster and takes less code.

Still... could be better to skip some of the optimizations. Opinions ?

Changed 11 years ago by mike.helgeson

Attachment: enterleave_patch.js added

new hybrid from both versions

comment:2 Changed 11 years ago by mike.helgeso

Hybrid version for expands further on Ariels changes... It makes the withinElement function the actual handler, which is shared by both events (and not exposed). This version is not aggressive with variable references because I think "minifying" does not munge variable names, it just removes comments and whitespace.

comment:3 Changed 11 years ago by flesler

Resolution: fixed
Status: assignedclosed

Applied yours at [5797] only with slight modifications.

Note: See TracTickets for help on using tickets.