add namespace: base & events

fix a bug while calling 'onload'