simple javascript library for loading external script handling event