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")
|
public inline fun jsTypeOf(a: Any?): String = js("typeof a")
|
||||||
|
|
||||||
@library
|
internal inline fun deleteProperty(obj: Any, property: Any){
|
||||||
internal fun deleteProperty(`object`: Any, property: Any): Unit = noImpl
|
js("delete obj[property]")
|
||||||
|
}
|
||||||
@@ -340,10 +340,6 @@ Kotlin.arrayFromFun = function (size, initFun) {
|
|||||||
return result;
|
return result;
|
||||||
};
|
};
|
||||||
|
|
||||||
Kotlin.deleteProperty = function (object, property) {
|
|
||||||
delete object[property];
|
|
||||||
};
|
|
||||||
|
|
||||||
Kotlin.jsonAddProperties = function (obj1, obj2) {
|
Kotlin.jsonAddProperties = function (obj1, obj2) {
|
||||||
for (var p in obj2) {
|
for (var p in obj2) {
|
||||||
if (obj2.hasOwnProperty(p)) {
|
if (obj2.hasOwnProperty(p)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user