aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2012-05-09 15:06:30 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2012-05-09 15:07:03 +0200
commit6d0f09908d5c9a4e78bb369d583943830811e3cc (patch)
treea40c4fb3df5b5022796595830af7bee8c761f80f /tests
parentd8b7b6067851ec45dd72d2e25ae2b170784b0108 (diff)
Set the prototype delegator.
Diffstat (limited to 'tests')
-rw-r--r--tests/fun.2.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/fun.2.js b/tests/fun.2.js
index 7eabdd0a93..c3fb613ac6 100644
--- a/tests/fun.2.js
+++ b/tests/fun.2.js
@@ -4,6 +4,11 @@ function Point(x,y) {
this.y = 20
}
+Point.prototype = {
+ print: function() { print(this.x, this.y) }
+}
+
var pt = new Point(10, 20)
print(pt.x, pt.y)
+pt.print()