LibWeb: Implement Navigator.serviceWorker

This currently returns a stubbed `ServiceWorkerContainer` object.
This commit is contained in:
Tim Ledbetter 2024-08-22 18:09:35 +01:00 committed by Andreas Kling
commit f3405b6eb2
Notes: github-actions[bot] 2024-08-25 10:54:02 +00:00
3 changed files with 18 additions and 0 deletions

View file

@ -54,6 +54,8 @@ public:
Optional<FlyString> do_not_track() const;
JS::NonnullGCPtr<ServiceWorkerContainer> service_worker();
static WebIDL::Long max_touch_points();
virtual ~Navigator() override;
@ -77,6 +79,9 @@ private:
// https://html.spec.whatwg.org/multipage/interaction.html#dom-navigator-useractivation
JS::GCPtr<UserActivation> m_user_activation;
// https://w3c.github.io/ServiceWorker/#navigator-serviceworker
JS::GCPtr<ServiceWorkerContainer> m_service_worker_container;
};
}