mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-25 05:55:13 +00:00
LibWeb/URLPattern: Add a stub for URLPattern.exec
Just enough to get the IDL compiling :^)
This commit is contained in:
parent
ba382c454a
commit
8088ab5306
Notes:
github-actions[bot]
2025-02-10 17:06:13 +00:00
Author: https://github.com/shannonbooth Commit: https://github.com/LadybirdBrowser/ladybird/commit/8088ab53061 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3237 Reviewed-by: https://github.com/tcl3 ✅
3 changed files with 11 additions and 1 deletions
|
@ -36,4 +36,11 @@ WebIDL::ExceptionOr<GC::Ref<URLPattern>> URLPattern::construct_impl(JS::Realm& r
|
|||
return realm.create<URLPattern>(realm);
|
||||
}
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#dom-urlpattern-exec
|
||||
Optional<URLPatternResult> URLPattern::exec(URLPatternInput const&, Optional<String> const&) const
|
||||
{
|
||||
dbgln("FIXME: Implement URLPattern::match");
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace Web::URLPattern {
|
|||
using URLPatternInit = URL::Pattern::Init;
|
||||
using URLPatternInput = URL::Pattern::Input;
|
||||
using URLPatternOptions = URL::Pattern::Options;
|
||||
using URLPatternResult = URL::Pattern::Result;
|
||||
|
||||
// https://urlpattern.spec.whatwg.org/#urlpattern
|
||||
class URLPattern : public Bindings::PlatformObject {
|
||||
|
@ -26,6 +27,8 @@ 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& = {});
|
||||
|
||||
Optional<URLPatternResult> exec(URLPatternInput const&, Optional<String> const&) const;
|
||||
|
||||
virtual ~URLPattern() override;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -8,7 +8,7 @@ interface URLPattern {
|
|||
|
||||
[FIXME] boolean test(optional URLPatternInput input = {}, optional USVString baseURL);
|
||||
|
||||
[FIXME] URLPatternResult? exec(optional URLPatternInput input = {}, optional USVString baseURL);
|
||||
URLPatternResult? exec(optional URLPatternInput input = {}, optional USVString baseURL);
|
||||
|
||||
[FIXME] readonly attribute USVString protocol;
|
||||
[FIXME] readonly attribute USVString username;
|
||||
|
|
Loading…
Add table
Reference in a new issue