mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 20:59:16 +00:00
LibWeb: Add CSS ParsingContext constructor with a realm and URL
This is useful for when we want to parse paths relative to the current ESO's api base url when there isn't a document, such as in a Worker context.
This commit is contained in:
parent
8872008958
commit
d76167b8a4
Notes:
sideshowbarker
2024-07-17 05:19:06 +09:00
Author: https://github.com/ADKaster
Commit: d76167b8a4
Pull-request: https://github.com/SerenityOS/serenity/pull/24339
2 changed files with 8 additions and 0 deletions
|
@ -19,6 +19,13 @@ ParsingContext::ParsingContext(JS::Realm& realm, Mode mode)
|
|||
{
|
||||
}
|
||||
|
||||
ParsingContext::ParsingContext(JS::Realm& realm, URL::URL url, Mode mode)
|
||||
: m_realm(realm)
|
||||
, m_url(move(url))
|
||||
, m_mode(mode)
|
||||
{
|
||||
}
|
||||
|
||||
ParsingContext::ParsingContext(DOM::Document const& document, URL::URL url, Mode mode)
|
||||
: m_realm(const_cast<JS::Realm&>(document.realm()))
|
||||
, m_document(&document)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue