you can also simplyify it to  a single return 

```javascript
return keygen.type === 'keygen' || "_moz-type" in keygen.attributes
```