[WIP] Service worker support
Implementation of:
- https://github.com/rubycdp/ferrum/issues/388
Hey @route, this is a follow up to our conversation as far as service worker support. I based this PR on your comment:
- https://github.com/rubycdp/ferrum/issues/388#issuecomment-1681602670
This is a first draft. I could use a bit more guidance, so I'll leave some notes across the changed files.
I'm now on the road but I'll check your implementation this weekend, I hope by that time I'll be home.
Okay, sounds great!
@johncoates-st let me first finish new headless mode for Ferrum, as there are architecture changes for the gem since frames don't work like they were. So we might need some changes here as well.
@route Okay, sounds good. What kind of timeline are you thinking for that new headless mode getting merged?
@johncoates-st it's merged, so I'm fully yours ;) I'll start playing with it today.
@route Great! Looking forward to your feedback
I think first of all we should address Target.setAutoAttach and change code to support Runtime.runIfWaitingForDebugger and sessions. Maybe even remove dedicated connection to page/target, but I currently have no idea how sessions work in Chrome with new flatten mode. There's little info about it, so we need to experiment. After that we can intro workers, doing it all at once seems a bit complicated.
The support for flatten mode and auto-attach landed to the main branch. Could you please rebase and now we can continue on service workers. To answer your questions I think it makes more sense not to derive from the Page class.
@route That's great! Okay sounds good, I'll rebase.