Event Based JavaScript Library