Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Service worker support #388

Open
johncoates-st opened this issue Aug 16, 2023 · 3 comments
Open

Service worker support #388

johncoates-st opened this issue Aug 16, 2023 · 3 comments

Comments

@johncoates-st
Copy link

browser.network.traffic isn't working for traffic that happens in service workers. Has this been considered? I could put together a pull request if pointed in the right direction for implementing this feature.

@route
Copy link
Member

route commented Aug 17, 2023

@johncoates-st you could check https://chromedevtools.github.io/devtools-protocol/tot/ServiceWorker/ and then:

  1. Add ServiceWorker.enable feature in https://github.com/rubycdp/ferrum/blob/main/lib/ferrum/page.rb#L357.
    Though I'm not sure about behavior or if it even fits well network domain.

  2. Run one of the specs for network with log debug like: FERRUM_DEBUG=true rspec spec/network_spec.rb:5 and see how CDP communication works for Chrome.

  3. For service workers I think you need to add one more endpoint to our test application with some custom JS, and also test the communication.

@johncoates-st
Copy link
Author

Thanks for the references and guidance @route

@johncoates-st
Copy link
Author

johncoates-st commented Aug 22, 2023

Just created a draft PR based on your guidance.

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

No branches or pull requests

2 participants