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