Skip to content
This repository has been archived by the owner on Dec 16, 2023. It is now read-only.

XMLHttpRequest hard to trace; Are contributions welcome? #1194

Open
unblu-kschiess opened this issue Apr 2, 2019 · 0 comments
Open

XMLHttpRequest hard to trace; Are contributions welcome? #1194

unblu-kschiess opened this issue Apr 2, 2019 · 0 comments

Comments

@unblu-kschiess
Copy link
Contributor

With the current API, it is very hard to know what is going on with XHR requests inside the page. You can hook 'xhr' event on the browser/window, but that only gives you eventName (loadstart, load, error, ...) and the url that was accessed. People (like me) who need precise timing information can hook the resource pipeline - only then it is really hard to figure out something is a XHR request.

Ideally, I would like to receive events on a target that is accessible to me, containing more information but at the very least:

  • xhr instance - so I can interact with it directly and also as a form of 'request identity'
  • the actual 'event' - not just the eventName
  • the url requested (works today)

You could for example make this look as follows:

const browser = new Browser()
browser.on('xhrDebug', (event, url, xhr) => {
  // Do something with the event here: xhr uniquely identifies this request
})

I realise that this would be the first such API that is only targeted at zombie users (non-web API). Are you interested in such a contribution at all?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant