aFarkas / html5shiv

This script is the defacto way to enable use of HTML5 sectioning elements in legacy Internet Explorer.
http://paulirish.com/2011/the-history-of-the-html5-shiv/
9.89k stars 2.56k forks source link

Throws an error in JSLint and also in JSHint #141

Closed dvorapa closed 10 years ago

dvorapa commented 10 years ago

So some small repair, but I haven't tested, if the function will do the same as before...

jonathantneal commented 10 years ago

A return statement in a while loop?

aFarkas commented 10 years ago

Did you mean:

if (node.specified) {
    wrapper.setAttribute(node.nodeName, node.nodeValue));
}
dvorapa commented 10 years ago

Oh, sorry, I didn't realize the surrounding while loop. And yes, I meant something like if clause or the ? : pattern, the return is not possible

dvorapa commented 10 years ago

Concretely: On the line 362 throws JSHint the error "Expected an assignment or function call and instead saw an expression." I just tried to fix it, because the while loop should not contain only expressions, but it depends on the opinion.

dvorapa commented 9 years ago

Closed in favor of #149