mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-30 19:17:31 +09:00
JS - support for Array.prototype.values()
This commit is contained in:
parent
ef6478af8c
commit
f8591643c5
8 changed files with 32 additions and 9 deletions
|
|
@ -2936,6 +2936,11 @@ DefineFunctionFromSpec(JSContext* cx, HandleObject obj, const JSFunctionSpec* fs
|
|||
if (!PropertySpecNameToId(cx, fs->name, &id))
|
||||
return false;
|
||||
|
||||
if (StandardProtoKeyOrNull(obj) == JSProto_Array && id == NameToId(cx->names().values)) {
|
||||
if (!cx->options().arrayProtoValues())
|
||||
return true;
|
||||
}
|
||||
|
||||
JSFunction* fun = NewFunctionFromSpec(cx, fs, id);
|
||||
if (!fun)
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue