Code example for Element

Methods: setAttribute

0
public class CodePanelRenderer extends DomReportRenderer<String> {
    @Override 
    public void render(String text, Element parent) {
        // Wrap in a <span>, to work around CSS problem in IE 
        Element span = append(parent, "span");
        span.setAttribute("class", "code");
        appendWithText(span, "pre", text);
    } 
}