You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ES6 requires more strict syntax when "u" flag is specified for RegExp (see the difference between [+U] and [~U] there), and it rejects some patterns that was working without "u" flag.
for example, escaping single-quote is disallowed when "u" flag is set, and following case does no pattern matching, because of SyntaxError.
var input = document.getElementById("id_of_input");
input.pattern = "foo\\'bar";
input.value = "foo\\'bar"; // the input is not suffered
input.value = "baz"; // the input is not suffered (!)
IIUC, the flag for pattern attribute is changed at some point from "", and this may cause backward compatibility issue.
Also, it could be hard to figure out the regression, for web content authors, because the SyntaxError is not reported, according to the spec.