mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-23 09:48:45 +00:00
AK+LibURL: Move AK::URL into a new URL library
This URL library ends up being a relatively fundamental base library of the system, as LibCore depends on LibURL. This change has two main benefits: * Moving AK back more towards being an agnostic library that can be used between the kernel and userspace. URL has never really fit that description - and is not used in the kernel. * URL _should_ depend on LibUnicode, as it needs punnycode support. However, it's not really possible to do this inside of AK as it can't depend on any external library. This change brings us a little closer to being able to do that, but unfortunately we aren't there quite yet, as the code generators depend on LibCore.
This commit is contained in:
@@ -17,20 +17,20 @@ JS_DEFINE_ALLOCATOR(JavaScriptModuleScript);
|
||||
|
||||
ModuleScript::~ModuleScript() = default;
|
||||
|
||||
ModuleScript::ModuleScript(URL base_url, ByteString filename, EnvironmentSettingsObject& environment_settings_object)
|
||||
ModuleScript::ModuleScript(URL::URL base_url, ByteString filename, EnvironmentSettingsObject& environment_settings_object)
|
||||
: Script(move(base_url), move(filename), environment_settings_object)
|
||||
{
|
||||
}
|
||||
|
||||
JavaScriptModuleScript::~JavaScriptModuleScript() = default;
|
||||
|
||||
JavaScriptModuleScript::JavaScriptModuleScript(URL base_url, ByteString filename, EnvironmentSettingsObject& environment_settings_object)
|
||||
JavaScriptModuleScript::JavaScriptModuleScript(URL::URL base_url, ByteString filename, EnvironmentSettingsObject& environment_settings_object)
|
||||
: ModuleScript(move(base_url), move(filename), environment_settings_object)
|
||||
{
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/webappapis.html#creating-a-javascript-module-script
|
||||
WebIDL::ExceptionOr<JS::GCPtr<JavaScriptModuleScript>> JavaScriptModuleScript::create(ByteString const& filename, StringView source, EnvironmentSettingsObject& settings_object, URL base_url)
|
||||
WebIDL::ExceptionOr<JS::GCPtr<JavaScriptModuleScript>> JavaScriptModuleScript::create(ByteString const& filename, StringView source, EnvironmentSettingsObject& settings_object, URL::URL base_url)
|
||||
{
|
||||
// 1. If scripting is disabled for settings, then set source to the empty string.
|
||||
if (settings_object.is_scripting_disabled())
|
||||
|
||||
Reference in New Issue
Block a user