brianleroux / xui

A tiny javascript framework for mobile web apps.
http://github.com/xui/xui
391 stars 159 forks source link

fast matching for pure ID selectors fails if context != document #44

Closed aglemann closed 13 years ago

aglemann commented 13 years ago

jQuery solves this by matching against:

quickExpr = /^[^<](<[\w\W]+>)[^>]$|^#([\w-]+)$/,

then only branches to the getElementById if match[1] && !context

brianleroux commented 13 years ago

do believe this is now fixed