ladybird/Userland/Libraries/LibWeb/HTML/WorkerLocation.h
Linus Groh 4270ede7c4 LibWeb: Remove WRAPPER_HACK() macro
We no longer access Bindings::FooWrapper anywhere for a Foo platform
object, so these can be removed :^)
2022-09-21 21:12:24 +01:00

40 lines
917 B
C++

/*
* Copyright (c) 2022, Andrew Kaster <akaster@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibWeb/Bindings/PlatformObject.h>
namespace Web::HTML {
// https://html.spec.whatwg.org/multipage/workers.html#worker-locations
class WorkerLocation : public Bindings::PlatformObject {
WEB_PLATFORM_OBJECT(WorkerLocation, Bindings::PlatformObject);
public:
static JS::NonnullGCPtr<WorkerLocation> create(WorkerGlobalScope&);
virtual ~WorkerLocation() override;
String href() const;
String origin() const;
String protocol() const;
String host() const;
String hostname() const;
String port() const;
String pathname() const;
String search() const;
String hash() const;
private:
explicit WorkerLocation(WorkerGlobalScope&);
virtual void visit_edges(Cell::Visitor&) override;
WorkerGlobalScope& m_global_scope;
};
}