temptag
public javascript v1 · immutable/** * este helper carrega scripts em tags temporárias e as remove em seguida. * * @param uri * */function TempTag(uri){ var tag = document.createElement("script"); var marcador = "variable"+(new Date().getTime())+"="+(new Date().getTime()); tag.src = uri.lastIndexOf("?") > -1 ? uri+"&"+marcador : uri+"?"+marcador; tag.onload=function(){ document.body.removeChild(tag); }; this.carregar=function(){ document.body.appendChild(tag); };}