Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.3.1
-
None
Description
Run this snippet in qmlscene:
import QtQuick 2.0 Item { Component.onCompleted: { var obj = {foo: 1, bar: 2, asdf: 3, blub: 4}; console.log("before: ", JSON.stringify(obj)); for (var prop in obj) { delete obj[prop]; } console.log("after: ", JSON.stringify(obj)); } }
expected output:
qml: before:
qml: after: {}
actual output:
qml: before:
qml: after:
{"bar":2,"foo":1}When you run the snippet above (i.e. the contents of Component.onCompleted) in a browser environment (WebKit, Chromium, ...), the expected output will be shown.