Note: this example only works in browsers that have legacy getter/setter support (Firefox, Safari 3, Chrome, Opera 9.5).