Bug Tracker

Ticket #5825: jQuery-fix.txt

File jQuery-fix.txt, 1.1 KB (added by andrecassal, 10 years ago)

Added properties tests in 3 different lines, discribed in this file

Line 
1Line 408
2
3// Catch cases where $(document).ready() is called after the
4// browser event has already occurred.
5if ( document.readyState === "complete" ) {
6        return jQuery.ready();
7}
8
9to
10
11// Catch cases where $(document).ready() is called after the
12// browser event has already occurred.
13if ( document.hasOwnProperty("readyState") && document.readyState === "complete" ) {
14        return jQuery.ready();
15}
16
17------------------------------------------------------------------------
18
19
20Line 1003
21
22return typeof name === "string" ? thisCache[ name ] : thisCache;
23
24to
25
26return typeof name === "string" && thisCache.hasOwnProperty(name) ? thisCache[ name ] : thisCache;
27
28
29------------------------------------------------------------------------
30
31
32Line 1776
33
34// Trigger the event, it is assumed that "handle" is a function
35var handle = jQuery.data( elem, "handle" );
36if ( handle ) {
37        handle.apply( elem, data );
38}
39
40to
41
42// Trigger the event, it is assumed that "handle" is a function
43var handle = jQuery.data( elem, "handle" );
44if ( handle && handle.hasOwnProperty('apply') ) {
45        handle.apply( elem, data );
46}