Bug Tracker

Modify

Ticket #10814 (closed bug: fixed)

Opened 19 months ago

Last modified 5 months ago

make support as lazy as possible with closure in mind

Reported by: timmywil Owned by:
Priority: high Milestone: 2.0
Component: support Version: 1.7
Keywords: Cc:
Blocking: Blocked by:

Description

All of the support tests that run at doc ready, and possibly others, can instead be called lazily and then cached on jQuery.support. There are several advantages to this.

  1. It makes page loads faster.
  2. No doc ready needed
  3. No invisible body needed
  4. It is necessary for supporting Closure

Change History

comment:1 Changed 19 months ago by timmywil

  • Owner set to timmywil
  • Priority changed from undecided to blocker
  • Status changed from new to assigned
  • Component changed from unfiled to support
  • Milestone changed from None to 1.8

comment:2 Changed 18 months ago by ppan235@…

Do you imagine this would fix this bug I just reported? http://bugs.jquery.com/ticket/11082? I was calling jQuery.is(':visible') right after loading jQuery. The function started performing slowly, as it thought $.support.reliableHiddenOffsets was false; actually, the variable was undefined, as it hadn't been initialised at doc ready yet.

So, with a lazy solution, I imagine the first call to jQuery.is(':visible') would trigger the feature detect to set $.support.reliableHiddenOffsets?

comment:3 Changed 17 months ago by mikesherov

  • Owner changed from timmywil to mikesherov

comment:4 Changed 13 months ago by mikesherov

  • Priority changed from blocker to high
  • Milestone changed from 1.8 to 1.next

comment:5 Changed 8 months ago by mikesherov

  • Owner mikesherov deleted
  • Status changed from assigned to open

comment:6 Changed 6 months ago by dmethvin

It looks to me like there won't be much left of support.js once we've moved to 2.0, but I'll keep this open until our round of refactoring there.

comment:7 Changed 5 months ago by dmethvin

  • Status changed from open to closed
  • Resolution set to fixed
  • Milestone changed from 1.next to 2.0

This is essentially done in 2.0; we can always improve it as we see opportunities.

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.