mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:27:45 +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:
parent
f60a2a1d80
commit
7bdbac7fd9
6 changed files with 42 additions and 4 deletions
|
@ -62,6 +62,9 @@ public:
|
|||
bool is_same_origin_policy_enabled() const { return m_same_origin_policy_enabled; }
|
||||
void set_same_origin_policy_enabled(bool b) { m_same_origin_policy_enabled = b; }
|
||||
|
||||
bool is_scripting_enabled() const { return m_is_scripting_enabled; }
|
||||
void set_is_scripting_enabled(bool b) { m_is_scripting_enabled = b; }
|
||||
|
||||
private:
|
||||
PageClient& m_client;
|
||||
|
||||
|
@ -70,6 +73,8 @@ private:
|
|||
|
||||
// FIXME: Enable this by default once CORS preflight checks are supported.
|
||||
bool m_same_origin_policy_enabled { false };
|
||||
|
||||
bool m_is_scripting_enabled { true };
|
||||
};
|
||||
|
||||
class PageClient {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue