joelgriffith / navalia

A bullet-proof, fast, and reliable headless browser API
https://joelgriffith.github.io/navalia/
GNU General Public License v3.0
957 stars 33 forks source link

API for network requests #7

Closed joelgriffith closed 5 years ago

joelgriffith commented 7 years ago

Need to implement network requests. API might look like:

tab.onNetworkRequest((src: string) => {});

I think having distinct methods for this type of eventing are more obvious (especially with TS), vs using EventEmitter and emitting events on a particular action.

joelgriffith commented 7 years ago

Might overload the 'wait' method to allow specifying a URL with an optional 2nd arg of response meta data (headers/body). Or establish a new method like 'receives' since the API for 'wait' might be doing too much