rapid7/metasploit-framework — pull request #3150 by wchen-r7 (2014-03-27 05:30:58+00:00)
Title: Add default detection for IE 9 and IE 10

How this is done:

On IE10, which should come first before the IE 9 check, the nodeName function always returns the name in uppercase.

One IE9, the "Object doesn't support property or method" error always repeats the name of the invalid method.

### Verification ###

- [ ] Copy code from line 947 to 988. This is the block that figures out which version of IE you're on if the ScriptEngine functions fail.
- [ ] Paste the code to the following template:

```javascript
var ua_version;

/* the code you copied */

console.log(ua_version);
```
- [ ] Test the code in IE's Developer's Tools. Make sure you test all the way to IE10.

If you're feeling lazy step 1 & 2, you can use the following:
https://gist.github.com/wchen-r7/bd810a33e791b9ad27f8