Issue #229825 by nod_, Rob Loach, sun, yched: Fixed ['has_js()'] must die.

PR for https://drupal.org/node/229825