[fix] prevent global leak
[test] Added javascript loading test