mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-02 22:55:23 +00:00
LibWeb: Add 'is scripting enabled' concept to EnvironmentSettingsObject
This is now the source of truth for 'user enabled/disabled scripting', but it has to ask the window's page, which actually stores the setting. Also use this new functionality in two places where it was previously marked as a FIXME.
This commit is contained in:
committed by
Andreas Kling
parent
f60a2a1d80
commit
7bdbac7fd9
@@ -24,7 +24,9 @@ NonnullRefPtr<ClassicScript> ClassicScript::create(String filename, StringView s
|
||||
if (muted_errors == MutedErrors::Yes)
|
||||
base_url = "about:blank";
|
||||
|
||||
// FIXME: 3. If scripting is disabled for settings, then set source to the empty string.
|
||||
// 3. If scripting is disabled for settings, then set source to the empty string.
|
||||
if (environment_settings_object.is_scripting_disabled())
|
||||
source = "";
|
||||
|
||||
// 4. Let script be a new classic script that this algorithm will subsequently initialize.
|
||||
auto script = adopt_ref(*new ClassicScript(move(base_url), move(filename), environment_settings_object));
|
||||
|
||||
Reference in New Issue
Block a user