Reputation: 326
I'm using html5shiv 1.6.2 (latest) and Prototype v1.7 (latest).
So, html5shiv makes my <article>
, <section>
etc elements work nicely in IE < 9. They appear, I can style them etc. All good.
However, if I try to grab any such HTML5 elements using Prototype's DOM-traversal methods (e.g. down()
, up()
), then they always return undefined
in IE8/IE7 (who cares about IE6?). For example:
<article id="foo">
<div></div>
<section></section>
<ul id="abc123"></ul>
</article>
..and then..
var bar = $('foo').down('div'); // works
var baz = $('foo').down('section'); // undefined
..and..
var theArticle = $('abc123').up('article'); // undefined
Anyone experienced such woes? Solutions/workarounds?
Upvotes: 2
Views: 315
Reputation: 326
This appears to be down to a bug in the sizzlejs selector engine as coupled with Prototype 1.7, but it's fixed in later versions of sizzlejs. So, options are:
Upvotes: 1