code: public static void inject(String javascript) {
      HeadElement head = getHead();
      ScriptElement element = createScriptElement();
      element.setText(javascript);
      head.appendChild(element);
    }
docs: Injects the JavaScript code into a
  {@code <script type="text/javascript">...</script>} element in the
  document header.
  
  @param javascript the JavaScript code