Smart wrapper JavaScript functions for DOM.