This repository was archived by the owner on Oct 8, 2021. It is now read-only.
File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1
- /*
1
+ /*
2
2
* "core" - The base file for jQm
3
3
*/
4
4
152
152
}
153
153
e = e . parentNode ;
154
154
}
155
-
155
+
156
156
// Return the theme letter we found, if none, return the
157
157
// specified default.
158
158
159
159
return ltr || defaultTheme || "a" ;
160
160
}
161
161
} ) ;
162
162
163
- // TODO the following $ and $.fn extensions can/probably should be moved into
164
- // jquery.mobile.core.helpers
165
-
166
- // Find the closest javascript page element to gather settings data
167
- // TODO complex selector parsing will slow down page load times
163
+ // TODO the following $ and $.fn extensions can/probably should be moved into jquery.mobile.core.helpers
164
+ //
165
+ // Find the closest javascript page element to gather settings data jsperf test
166
+ // http://jsperf.com/single-complex-selector-vs-many-complex-selectors/edit
167
+ // possibly naive, but it shows that the parsing overhead for *just* the page selector vs
168
+ // the page and dialog selector is negligable. This could probably be speed up by
169
+ // doing a similar parent node traversal to the one found in the inherited theme code above
168
170
$ . fn . closestPageData = function ( ) {
169
171
return $ ( this )
170
172
. closest ( ':jqmData(role="page"), :jqmData(role="dialog")' )
You can’t perform that action at this time.
0 commit comments