mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-02 22:30:31 +00:00
LibWeb/URLPattern: Implement the URLPattern IDL getters
These simply return the compiled URLPattern pattern strings for each component, and whether any of the components contained any regexp groups.
This commit is contained in:
parent
f3662c6f88
commit
cf7b775709
Notes:
github-actions[bot]
2025-02-18 00:11:33 +00:00
Author: https://github.com/shannonbooth
Commit: cf7b775709
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3547
3 changed files with 92 additions and 9 deletions
|
@ -29,12 +29,28 @@ public:
|
|||
|
||||
Optional<URLPatternResult> exec(URLPatternInput const&, Optional<String> const&) const;
|
||||
|
||||
String const& protocol() const;
|
||||
String const& username() const;
|
||||
String const& password() const;
|
||||
String const& hostname() const;
|
||||
String const& port() const;
|
||||
String const& pathname() const;
|
||||
String const& search() const;
|
||||
String const& hash() const;
|
||||
|
||||
bool has_reg_exp_groups() const;
|
||||
|
||||
virtual ~URLPattern() override;
|
||||
|
||||
protected:
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
|
||||
explicit URLPattern(JS::Realm&);
|
||||
|
||||
private:
|
||||
// https://urlpattern.spec.whatwg.org/#ref-for-url-pattern%E2%91%A0
|
||||
// Each URLPattern has an associated URL pattern, a URL pattern.
|
||||
URL::Pattern::Pattern m_url_pattern;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue