Sign in
third-party-mirror
/
orbit
/
refs/heads/master
/
.
/
qt-everywhere-src-5.15.1
/
qtdeclarative
/
tests
/
manual
/
v4
/
accessors.js
blob: 3874e4d329c139cccf50b917630aa3991b00496d [
file
] [
log
] [
blame
]
"use strict"
;
var
foo
=
{
y
:
1
}
foo
.
__defineSetter__
(
"x"
,
function
(
x
)
{
this
.
y
=
x
;}
)
foo
.
__defineGetter__
(
"x"
,
function
()
{
return
this
.
y
;}
)
print
(
foo
.
y
);
foo
.
x
=
"ok"
;
print
(
foo
.
x
);
print
(
foo
.
y
);