Skip to content

Early browser API accesses and function calls are missed #77

Open
@asumansenol

Description

@asumansenol

Hi!
While running some pilot crawls for our current study, we found that the TRC doesn’t collect function calls or access to properties when the call/access occurs immediately after page load. Perhaps APICallCollector can’t find time to register the breakpoints. To test this issue, we have created two test pages that

  1. Access window.devicePixelRatio
  2. Call toDataURL method of an HTML5 canvas element

We’ve visited the test pages using the latest version of TRC without any modification.

  1. Test page 1: The script is run 1000ms after the page load.
  • Command: npm run crawl -- -u "https://homes.esat.kuleuven.be/~asenol/fp-test-with-timeout/" -o ./data/ -v -f -d 'apis'
  • In this case, the TRC correctly intercepts the API call and property access.
  1. Test website 2: The script is run immediately after the page load
  • Command npm run crawl -- -u "https://homes.esat.kuleuven.be/~asenol/fp-test-without-timeout/" -o ./data/ -v -f -d 'apis'
  • In this case, the TRC couldn’t intercept the API call and the property access.

I hope this helps. If you need any other info, just let me know.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions