WorkerLocation.h 934 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
  3. *
  4. * SPDX-License-Identifier: BSD-2-Clause
  5. */
  6. #pragma once
  7. #include <LibWeb/Bindings/PlatformObject.h>
  8. namespace Web::HTML {
  9. // https://html.spec.whatwg.org/multipage/workers.html#worker-locations
  10. class WorkerLocation : public Bindings::PlatformObject {
  11. WEB_PLATFORM_OBJECT(WorkerLocation, Bindings::PlatformObject);
  12. public:
  13. virtual ~WorkerLocation() override;
  14. DeprecatedString href() const;
  15. DeprecatedString origin() const;
  16. DeprecatedString protocol() const;
  17. DeprecatedString host() const;
  18. DeprecatedString hostname() const;
  19. DeprecatedString port() const;
  20. DeprecatedString pathname() const;
  21. DeprecatedString search() const;
  22. DeprecatedString hash() const;
  23. private:
  24. explicit WorkerLocation(WorkerGlobalScope&);
  25. virtual void visit_edges(Cell::Visitor&) override;
  26. WorkerGlobalScope& m_global_scope;
  27. };
  28. }