Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.HeadElement


   *            the value of the {@code name} attribute.
   * @param content
   *            the value of the {@code content} attribute.
   */
  public static void inject(String name, String content) {
    HeadElement head = getHead();
    MetaElement element = createMetaElement();
    element.setName(name);
    element.setContent(content);
    head.appendChild(element);
  }
View Full Code Here


  protected static HeadElement getHead() {
    if (head == null) {
      Element element =
          Document.get().getElementsByTagName("head").getItem(0);
      assert element != null : "HTML Head element required";
      HeadElement head = HeadElement.as(element);
      AbstractInjector.head = head;
    }
    return AbstractInjector.head;
  }
View Full Code Here

   *
   * @param javascript
   *            the JavaScript code
   */
  public static void inject(String javascript) {
    HeadElement head = getHead();
    ScriptElement element = createScriptElement();
    element.setText(javascript);
    head.appendChild(element);
  }
View Full Code Here

   *
   * @param javascript
   *            the JavaScript code
   */
  public static void inject(String javascript) {
    HeadElement head = getHead();
    ScriptElement element = createScriptElement();
    element.setText(javascript);
    head.appendChild(element);
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.HeadElement

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.