sophsec/xss.js — pull request #1 by mephux (2012-07-31 01:15:36+00:00)
Title: Minor performance enhancements

Change iteration for performance and cache length. Use self vs calling the parent name in functions.

```javascript
var length = links.length;
for (var i = 0; i < length; i += 1) {
var link = links[i];

if (link.hasAttribute('action')) {
if (callback && (typeof callback === "function")) {
// ...
}
}
};
```