[js] add 'listeners' method for fetching array of listeners