fix missing variable
add features.js
almost finished

It still has bugs in attribute selectors
Revert "almost finished"

This reverts commit 403d2e2a0dfa8a1f39316f5d18305e86469e0047.