schickling/chromeless

Listening to instance events

Open

#257 geöffnet am 22. Aug. 2017

Auf GitHub ansehen
 (1 Kommentar) (3 Reaktionen) (0 zugewiesene Personen)TypeScript (606 Forks)batch import
APIfeaturehelp wanted

Repository-Metriken

Stars
 (13.240 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

With nightmare.js it is possible to add an event listener, for example:

function onResponseDetails(event, status, newURL, originalURL, httpResponseCode, requestMethod, referrer, headers, resourceType) {
    if (httpResponseCode === 200) {
        if (resourceType === 'stylesheet') { stylesheets.push(newURL); }
        if (resourceType === 'image') { images.push(newURL);}
    }
  }

nightmare.on('did-get-response-details', onResponseDetails)

I think it's actually a electron feature https://electron.atom.io/docs/api/web-contents/#instance-events.

Anyway, I humbly request similar functionality to be added to chromeless. (Perhaps there is a way already?)

Thank you for your time!

Contributor Guide