mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 12:19:54 +00:00
LibWeb/URLPattern: Add initial stub for URLPattern interface
This commit is contained in:
parent
46bfced9ad
commit
d4649db55e
Notes:
github-actions[bot]
2025-01-27 18:08:17 +00:00
Author: https://github.com/shannonbooth
Commit: d4649db55e
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3224
Reviewed-by: https://github.com/AtkinsSJ ✅
9 changed files with 146 additions and 0 deletions
37
Libraries/LibWeb/URLPattern/URLPattern.h
Normal file
37
Libraries/LibWeb/URLPattern/URLPattern.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/String.h>
|
||||
#include <LibURL/Pattern/Init.h>
|
||||
#include <LibURL/Pattern/Pattern.h>
|
||||
#include <LibWeb/Bindings/PlatformObject.h>
|
||||
|
||||
namespace Web::URLPattern {
|
||||
|
||||
using URLPatternInit = URL::Pattern::Init;
|
||||
using URLPatternInput = URL::Pattern::Input;
|
||||
using URLPatternOptions = URL::Pattern::Options;
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#urlpattern
|
||||
class URLPattern : public Bindings::PlatformObject {
|
||||
WEB_PLATFORM_OBJECT(URLPattern, Bindings::PlatformObject);
|
||||
GC_DECLARE_ALLOCATOR(URLPattern);
|
||||
|
||||
public:
|
||||
static WebIDL::ExceptionOr<GC::Ref<URLPattern>> construct_impl(JS::Realm&, URLPatternInput const&, String const& base_url, URLPatternOptions const& = {});
|
||||
static WebIDL::ExceptionOr<GC::Ref<URLPattern>> construct_impl(JS::Realm&, URLPatternInput const&, URLPatternOptions const& = {});
|
||||
|
||||
virtual ~URLPattern() override;
|
||||
|
||||
protected:
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
explicit URLPattern(JS::Realm&);
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue