KJS: reimplement deleteProperty in Kotlin

This commit is contained in:
Zalim Bashorov
2016-12-24 22:53:10 +03:00
parent 6ea6e4ab98
commit edf1c2da0f
2 changed files with 3 additions and 6 deletions
+3 -2
View File
@@ -24,5 +24,6 @@ public external fun js(code: String): dynamic = noImpl
*/
public inline fun jsTypeOf(a: Any?): String = js("typeof a")
@library
internal fun deleteProperty(`object`: Any, property: Any): Unit = noImpl
internal inline fun deleteProperty(obj: Any, property: Any){
js("delete obj[property]")
}
-4
View File
@@ -340,10 +340,6 @@ Kotlin.arrayFromFun = function (size, initFun) {
return result;
};
Kotlin.deleteProperty = function (object, property) {
delete object[property];
};
Kotlin.jsonAddProperties = function (obj1, obj2) {
for (var p in obj2) {
if (obj2.hasOwnProperty(p)) {