use native javascript to call events.