Move part of the hasAttribute from forms plugin to the core.
Tests: Tests for hasAttribute method with input elements.
Refactor hasAttribute method to check the browser once instead on 3 times.
Code refactoring and code style: Simplified conditions, rename, missing semicolons.
Changelog entry.
Merge branch 't/11945'