}
// "attachTo" attribute may contain several ids splitted by ","
String selector = replaceClientIds(context, component, attachTo);
eventFunction.addParameter(selector);
componentControl.addOptions(eventFunction, event, forAttr, operation);
}
if (eventFunction != null || namedFunction != null) {
writer.startElement(HTML.SCRIPT_ELEM, componentControl);
getUtils().writeAttribute(writer, HTML.TYPE_ATTR, "text/javascript");