veracitylab / DOM-Instrumentation-to-Display-Provenance-Data

Honours Project: JavaScript program to Instrument DOM elements manipulated by Ajax calls to facilitate in exposing Provenance Data
0 stars 0 forks source link

Time-based heuristic mapping of requests to UI element updates #5

Open wtwhite opened 6 months ago

wtwhite commented 6 months ago

Split out from #4, which explains the problems with the existing implementations.

A programmatic HTTP request happens-before every UI update that depends on it. We can also reasonably assume that every UI update happens within some short time (e.g., 1s) of the HTTP response being received. Together these give a way to heuristically map UI updates back to HTTP requests in a many-to-many fashion, based on time:

wtwhite commented 6 months ago

Note: Request IDs aren't available from XMLHttpRequest or fetch() directly, but are available via the webRequest API: https://developer.chrome.com/docs/extensions/reference/api/webRequest#event-onBeforeRequest