Bug Tracker


Ticket #10814 (closed bug: fixed)

Opened 2 years ago

Last modified 7 months ago

make support as lazy as possible with closure in mind

Reported by: timmywil Owned by: m_gol
Priority: high Milestone: 1.11/2.1
Component: support Version: 1.7
Keywords: Cc:
Blocking: Blocked by:


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 2 years 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 2 years 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 2 years ago by mikesherov

  • Owner changed from timmywil to mikesherov

comment:4 Changed 2 years ago by mikesherov

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

comment:5 Changed 18 months ago by mikesherov

  • Owner mikesherov deleted
  • Status changed from assigned to open

comment:6 Changed 16 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 15 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.

comment:8 Changed 9 months ago by m_gol

  • Status changed from closed to reopened
  • Resolution fixed deleted
  • Milestone 2.0 deleted

comment:9 Changed 9 months ago by m_gol

  • Owner set to m_gol
  • Status changed from reopened to assigned
  • Milestone set to 2.next

I'm taking it over. I'll get to it as soon as timmywil's AMD branch is merged.

comment:10 Changed 9 months ago by dmethvin

  • Blocking 14164 added

comment:11 Changed 7 months ago by Michał Gołębiowski

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

Fix #10814. Make support tests lazy and broken out to components.

Changeset: bbbdd947256a3fcd788fb9d4f306046082a1ef1f

comment:12 Changed 7 months ago by dmethvin

  • Blocking 14164 removed

(In #14164) It's blocked by an open ticket, but it is probably better to handle the others on a case-by-case basis rather than a meta-ticket.

comment:13 Changed 7 months ago by dmethvin

  • Milestone changed from 2.next to 1.11/2.1

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


Add a comment

Modify Ticket

as closed

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

Note: See TracTickets for help on using tickets.