aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmlecmascript/data/functionAssignment.js
blob: 3ba4e193e6a5bb56a8157b21a6b34699a29d8ec8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
function bindProperty()
{
    a = Qt.binding(function(){ return aNumber * 10 })
}


function TestObject() { }
TestObject.prototype.aNumber = 928349
TestObject.prototype.bindFunction = function() {
    return this.aNumber * 10        // this should not use the TestObject's aNumber
}
var testObj = new TestObject()

function bindPropertyWithThis()
{
    a = Qt.binding(testObj.bindFunction)
}