mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-01-23 09:46:04 -05:00
3ce81512dd
We stopped worrying about tiny OOMs a while ago.
40 lines
944 B
C++
40 lines
944 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);
|
|
GC_DECLARE_ALLOCATOR(WorkerLocation);
|
|
|
|
public:
|
|
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 initialize(JS::Realm&) override;
|
|
virtual void visit_edges(Cell::Visitor&) override;
|
|
|
|
GC::Ref<WorkerGlobalScope> m_global_scope;
|
|
};
|
|
|
|
}
|