function reroot(rname,attr){
   return function(n){
     let s=n.getAttribute(attr);
     if(s.startsWith("/")){
       s = s.substr(1);
       if(s.lastIndexOf("/")<1){
         s = dyn_root+rname +"/"+s;
       }
       n.setAttribute(attr,url_root+s)
     }
   }
}
// reroot() Prepends the base address to absolute paths in the DOM
reroot() Prepends the base address to absolute paths in the DOM
reroot () Prepends the base address to absolute paths in the DOM
function reroot(rname,attr){
   return function(n){
     let s=n.getAttribute(attr);
     if(s.startsWith("/")){
       s = s.substr(1);
       if(s.lastIndexOf("/")<1){
         s = dyn_root+rname +"/"+s;
       }
       n.setAttribute(attr,url_root+s)
     }
   }
}
function reroot ( rname , attr ) { return function ( n ) { let s = n . getAttribute ( attr ) ; if ( s . startsWith ( "/" ) ) { s = s . substr ( 1 ) ; if ( s . lastIndexOf ( "/" ) < 1 ) { s = dyn_root + rname + "/" + s ; } n . setAttribute ( attr , url_root + s ) } } }
reroot() Prepends the base address to absolute paths in the DOM
reroot () Prepends the base address to absolute paths in the DOM