mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-01 00:38:48 +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
39
Libraries/LibWeb/URLPattern/URLPattern.cpp
Normal file
39
Libraries/LibWeb/URLPattern/URLPattern.cpp
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2025, Shannon Booth <shannon@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/Bindings/URLPatternPrototype.h>
|
||||
#include <LibWeb/URLPattern/URLPattern.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
||||
namespace Web::URLPattern {
|
||||
|
||||
GC_DEFINE_ALLOCATOR(URLPattern);
|
||||
|
||||
URLPattern::URLPattern(JS::Realm& realm)
|
||||
: PlatformObject(realm)
|
||||
{
|
||||
}
|
||||
|
||||
URLPattern::~URLPattern() = default;
|
||||
|
||||
void URLPattern::initialize(JS::Realm& realm)
|
||||
{
|
||||
Base::initialize(realm);
|
||||
WEB_SET_PROTOTYPE_FOR_INTERFACE(URLPattern);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<URLPattern>> URLPattern::construct_impl(JS::Realm& realm, URLPatternInput const&, String const&, URLPatternOptions const&)
|
||||
{
|
||||
return realm.create<URLPattern>(realm);
|
||||
}
|
||||
|
||||
WebIDL::ExceptionOr<GC::Ref<URLPattern>> URLPattern::construct_impl(JS::Realm& realm, URLPatternInput const&, URLPatternOptions const&)
|
||||
{
|
||||
return realm.create<URLPattern>(realm);
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue