93 DRAIN_XML_TREE(N) & getOnLoadScript(DRAIN_XML_TREE(N) & root);
98 DRAIN_XML_TREE(N) & ensureScript(DRAIN_XML_TREE(N) & root,
const std::string & label,
const std::string & code){
99 DRAIN_XML_TREE(N) & scriptElem = UtilsXML::getHeaderObject(root, N::xml_tag_t::SCRIPT, label);
118 template <
typename N,
typename ...TT>
125 DRAIN_XML_TREE(N) & jsFunction = UtilsXML::getHeaderObject(root, N::xml_tag_t::SCRIPT);
127 DRAIN_XML_TREE(N) & jsFunctionScope = jsFunction[name](N::xml_tag_t::SCOPE_CURLY);
129 if (jsFunctionScope.empty()){
130 jsFunctionScope->setText(
"function ", name,
'(',
StringBuilder<
','>(args...),
')');
132 jsFunction.addChild()->setText(
'\n');
136 return jsFunctionScope;
139 template <
typename N>
141 DRAIN_XML_TREE(N) & ensureJavaScriptUrl(DRAIN_XML_TREE(N) & root,
const std::string & url){
150 if (c == DRAIN_XML_TREE(N)::path_t::separator.character){
154 mout.note(
"mapped id:",
id);
156 DRAIN_XML_TREE(N) & treeJS = UtilsXML::getHeaderObject(root, N::xml_tag_t::SCRIPT,
id);