#10814 closed bug (fixed)
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: | ||
| Blocked by: | Blocking: |
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.
- It makes page loads faster.
- No doc ready needed
- No invisible body needed
- It is necessary for supporting Closure
Change History (13)
comment:1 Changed 8 years ago by
| Component: | unfiled → support |
|---|---|
| Milestone: | None → 1.8 |
| Owner: | set to timmywil |
| Priority: | undecided → blocker |
| Status: | new → assigned |
comment:2 Changed 8 years ago by
comment:3 Changed 8 years ago by
| Owner: | changed from timmywil to mikesherov |
|---|
comment:4 Changed 7 years ago by
| Milestone: | 1.8 → 1.next |
|---|---|
| Priority: | blocker → high |
comment:5 Changed 7 years ago by
| Owner: | mikesherov deleted |
|---|---|
| Status: | assigned → open |
comment:6 Changed 7 years ago by
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 7 years ago by
| Milestone: | 1.next → 2.0 |
|---|---|
| Resolution: | → fixed |
| Status: | open → closed |
This is essentially done in 2.0; we can always improve it as we see opportunities.
comment:8 Changed 6 years ago by
| Milestone: | 2.0 |
|---|---|
| Resolution: | fixed |
| Status: | closed → reopened |
comment:9 Changed 6 years ago by
| Milestone: | → 2.next |
|---|---|
| Owner: | set to m_gol |
| Status: | reopened → assigned |
I'm taking it over. I'll get to it as soon as timmywil's AMD branch is merged.
comment:10 Changed 6 years ago by
| Blocking: | 14164 added |
|---|
comment:11 Changed 6 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Fix #10814. Make support tests lazy and broken out to components.
Changeset: bbbdd947256a3fcd788fb9d4f306046082a1ef1f
comment:12 Changed 6 years ago by
| 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 6 years ago by
| Milestone: | 2.next → 1.11/2.1 |
|---|

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?