diff options
Diffstat (limited to 'ext/webidl/00_webidl.js')
-rw-r--r-- | ext/webidl/00_webidl.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/webidl/00_webidl.js b/ext/webidl/00_webidl.js index dfaa774e2..ca1c7c606 100644 --- a/ext/webidl/00_webidl.js +++ b/ext/webidl/00_webidl.js @@ -59,6 +59,7 @@ const { ReflectHas, ReflectOwnKeys, RegExpPrototypeTest, + RegExpPrototypeExec, SafeRegExp, SafeSet, SetPrototypeEntries, @@ -406,7 +407,7 @@ converters.DOMString = function (V, prefix, context, opts = {}) { const IS_BYTE_STRING = new SafeRegExp(/^[\x00-\xFF]*$/); converters.ByteString = (V, prefix, context, opts) => { const x = converters.DOMString(V, prefix, context, opts); - if (!RegExpPrototypeTest(IS_BYTE_STRING, x)) { + if (RegExpPrototypeExec(IS_BYTE_STRING, x) === null) { throw makeException( TypeError, "is not a valid ByteString", |