LibJS: Enable the BrowserExtended ECMA262 regexp flag by default

Fixes #5517.
This commit is contained in:
AnotherTest 2021-02-27 00:26:45 +03:30 committed by Andreas Kling
parent e0ac85288e
commit 610cec6e72
Notes: sideshowbarker 2024-07-18 21:53:31 +09:00

View file

@ -37,7 +37,9 @@ static Flags options_from(const String& flags, VM& vm, GlobalObject& global_obje
{
bool g = false, i = false, m = false, s = false, u = false, y = false;
Flags options {
{ (regex::ECMAScriptFlags)regex::AllFlags::Global }, // JS regexps are all 'global' by default as per our definition, but the "global" flag enables "stateful".
// JS regexps are all 'global' by default as per our definition, but the "global" flag enables "stateful".
// FIXME: Enable 'BrowserExtended' only if in a browser context.
{ (regex::ECMAScriptFlags)regex::AllFlags::Global | ECMAScriptFlags::BrowserExtended },
{},
};