git://git.webkit.org
/
WebKit-https.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[ES6] Implement Reflect.has
[WebKit-https.git]
/
Source
/
JavaScriptCore
/
builtins
/
ReflectObject.js
diff --git
a/Source/JavaScriptCore/builtins/ReflectObject.js
b/Source/JavaScriptCore/builtins/ReflectObject.js
index
166af07
..
804c1e6
100644
(file)
--- a/
Source/JavaScriptCore/builtins/ReflectObject.js
+++ b/
Source/JavaScriptCore/builtins/ReflectObject.js
@@
-47,3
+47,12
@@
function deleteProperty(target, propertyKey)
return delete target[propertyKey];
}
+function has(target, propertyKey)
+{
+ "use strict";
+
+ if (!@isObject(target))
+ throw new @TypeError("Reflect.has requires the first argument be an object");
+
+ return propertyKey in target;
+}