ded / qwery

a query selector engine
Other
1.11k stars 104 forks source link

dom context with html5 tag #72

Open somajs opened 12 years ago

somajs commented 12 years ago

Hi,

It seems I have an issue on IE7 using a dom node context with a html5 tag, if that makes sense...

Note that if I change the tags from "section" to "div", it works. Articles tags don't work either.

Is that a bug or I'm missing something?

See the code below.

Romu

<!doctype html>
<html>
<head>
    <title>title</title>
</head>
<body>

<section id="main">
    <section class="test">

    </section>
    <section class="test">

    </section>
</section>

<script type="text/javascript" src="qwery.js"></script>

<script type="text/javascript">
    var main = qwery("#main")[0];
    alert(main)
    alert(main.id)
    var tests = qwery(".test", main);
    alert(tests)
    alert(tests.length)
</script>

</body>
</html>
ded commented 12 years ago

Qwery has a general problem with HTML5 tags... perhaps the HTML5 shiv would easily fix this for you?

somajs commented 12 years ago

I already tried that but it doesn't solve anything. Could I get more details about what the problem is (if you know already)?

jbmonroe commented 5 years ago

Perhaps this should be closed because IE7 isn't even a thing anymore--and it never could do HTML5 tags anyway.