package sharin.doc.builder.xhtml1;

import sharin.doc.builder.GenericXmlElem;

public class ScriptElem extends GenericXmlElem<ScriptElem> {

    public ScriptElem(Object... nodes) {
        super("script", nodes);
    }

    public ScriptElem charset(Object value) {
        return attr("charset", value);
    }

    public ScriptElem defer(boolean defer) {
        return defer ? defer("defer") : this;
    }

    public ScriptElem defer(Object value) {
        return attr("defer", value);
    }

    public ScriptElem language(Object value) {
        return attr("language", value);
    }

    public ScriptElem src(Object value) {
        return attr("src", value);
    }

    public ScriptElem type(Object value) {
        return attr("type", value);
    }

    public ScriptElem xmlspace(Object value) {
        return attr("xmlspace", value);
    }

    public ScriptElem xmlspacePreserve() {
        return xmlspace("preserve");
    }
}
