Avoid use of dynamic attributes with innerHTML. Close gh-190.

Some environments (Windows 8 Store App) will not permit the use of
innerHTML along with dynamic attributes like 'name'. You can, however,
set them via the setAttribute method. This should help those migrating
their code from the browser to a native application.