Example usage for com.google.gwt.dom.client StyleElement setPropertyString

List of usage examples for com.google.gwt.dom.client StyleElement setPropertyString

Introduction

In this page you can find the example usage for com.google.gwt.dom.client StyleElement setPropertyString.

Prototype

@Override
    public void setPropertyString(String name, String value) 

Source Link

Usage

From source file:com.dianaui.universal.core.client.ui.gwt.RichTextArea.java

License:Apache License

public void injectStyle(String css) {
    IFrameElement iframe = IFrameElement.as(getElement());

    StyleElement style = iframe.getContentDocument().createStyleElement();
    style.setPropertyString("language", "text/css");
    style.setType("text/css");

    setStyleContent(style, css);/*from  w  w w . j a  va 2  s  . co m*/

    iframe.getContentDocument().getElementsByTagName("head").getItem(0).appendChild(style);
}