element.setAttribute ("type", value);
}
// Allow subclasses to add extra attributes to script.
addScriptAttributes (element, attributes);
final ScriptAssetReference scriptReference = attributes.getScriptReference();
if (scriptReference != null) {
if (scriptReference.isURL()) {
final String url = scriptReference.getURL();
element.setAttribute("src", url);
} else {
// must be a literal script. sigh!
// TODO: make an enum for script asset type!
final String literalScript = scriptReference.getScript();
dom.appendEncoded(literalScript);
}
}
}