aFarkas/html5shiv — Issue #27: optimize condition
Author: jdalton
Created: 2012-01-30 02:57:43+00:00
State: open

this

~~~ js
if (html5.shivMethods && element.canHaveChildren && !(element.xmlns || element.tagUrn)) {
~~~

can be reworked to exit earlier

~~~ js
if (!html5.shivMethods || !element.canHaveChildren || element.xmlns || element.tagUrn) {
return element;
}
~~~