{"issue":{"created_at":"2011-11-16T10:34:43Z","state":"open","updated_at":"2011-11-18T10:33:20Z","comments":6,"user":{"gravatar_id":"009de0531c4b2d2e70bb52279638e31e","id":429446,"url":"https://api.github.com/users/mkristo","login":"mkristo","avatar_url":"https://secure.gravatar.com/avatar/009de0531c4b2d2e70bb52279638e31e?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Hi,\r\n\r\nI have found a bug(?) in qwery when trying to select an element when using an custom HTML element as context. I noticed this while porting from Sizzle to qwery. Try the following code to reproduce.\r\n\r\n```html\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:surf=\"\">\r\n    <head>\r\n        <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n        <script src=\"//github.com/jquery/sizzle/raw/master/sizzle.js\"></script>\r\n        <script src=\"//github.com/ded/qwery/raw/master/qwery.js\"></script>\r\n    </head>\r\n    <body>\r\n        <surf:container id=\"hello\">\r\n            <div id=\"world\"></div>\r\n        </surf:container>\r\n\r\n        <script>\r\n            console.debug(\"Sizzle #hello\", Sizzle(\"#hello\"));\r\n            console.debug(\"Sizzle #world\", Sizzle(\"#world\", Sizzle(\"#hello\")[0]));\r\n            console.debug(\"qwery #hello\", qwery(\"#hello\"));\r\n            console.debug(\"qwery #world\", qwery(\"#world\", qwery(\"#hello\")[0]));\r\n        </script>\r\n    </body>\r\n</html>\r\n```\r\n\r\nI get the following console output (using Chrome):\r\n\r\n```\r\nSizzle #hello [<surf:container id=​\"hello\">​…​</surf:container>]\r\nSizzle #world [<div id=​\"world\">​</div>]\r\nqwery #hello [<surf:container id=​\"hello\">​…​</surf:container>]\r\nUncaught TypeError: Object #<HTMLUnknownElement> has no method 'getElementById'\r\n```\r\n\r\nAs you can see Sizzle is able to handle this, but qwery is unable to select the inner element.","assignee":null,"id":2254783,"number":60,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Unable to select elements by id in custom HTML elements","closed_at":null,"html_url":"https://github.com/ded/qwery/issues/60","milestone":null,"url":"https://api.github.com/repos/ded/qwery/issues/60"},"action":"created","comment":{"created_at":"2011-11-18T10:33:20Z","updated_at":"2011-11-18T10:33:20Z","user":{"gravatar_id":"026f5af604a336a38301639027757f29","id":495647,"url":"https://api.github.com/users/rvagg","login":"rvagg","avatar_url":"https://secure.gravatar.com/avatar/026f5af604a336a38301639027757f29?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"Now we're just getting fancy for fancy's sake!\r\n\r\nI've committed some changes, rerun your test page.","id":2787748,"url":"https://api.github.com/repos/ded/qwery/issues/comments/2787748"}}