Ticket #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: | ||
| Blocking: | Blocked by: |
Description
Attachments
Change History
Changed 5 years ago by flesler
-
attachment
hover[5762].diff
added
comment:1 Changed 5 years ago by flesler
- need changed from Patch to Commit
- Status changed from new to assigned
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 5 years ago by mike.helgeson
-
attachment
enterleave_patch.js
added
new hybrid from both versions
comment:2 Changed 5 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.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

My proposal (349 bytes)