KJS: reimplement deleteProperty in Kotlin
This commit is contained in:
@@ -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]")
|
||||
}
|
||||
@@ -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)) {
|
||||
|
||||
Reference in New Issue
Block a user