This code is used to detect a WebKit bug that is by definition out of spec. And since even the _order of attribute definition in HTML source_ is relevant, it's entirely possible that direct DOM manipulation instead of HTML parsing fails to trigger it.

However, upon [inspection](http://jsfiddle.net/GUSw3/), this code checks out. But you still need spaces around the method arguments.