File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change 1- /*
1+ /*
22* "core" - The base file for jQm
33*/
44
152152 }
153153 e = e . parentNode ;
154154 }
155-
155+
156156 // Return the theme letter we found, if none, return the
157157 // specified default.
158158
159159 return ltr || defaultTheme || "a" ;
160160 }
161161 } ) ;
162162
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
168170 $ . fn . closestPageData = function ( ) {
169171 return $ ( this )
170172 . closest ( ':jqmData(role="page"), :jqmData(role="dialog")' )
You can’t perform that action at this time.
0 commit comments