__defineGetter__

Table of contents

  1. 1. Summary
  2. 2. Syntax
  3. 3. Parameters
  4. 4. Description
  5. 5. See also
Table of contents
  1. 1. Summary
  2. 2. Syntax
  3. 3. Parameters
  4. 4. Description
  5. 5. See also

Non-standard

Deprecated

Summary

Binds an object's property to a function to be called when that property is looked up.

Method of Object
Implemented in JavaScript ?
ECMAScript Edition None

Syntax

obj.__defineGetter__(sprop, fun)

Parameters

sprop
a string containing the name of the property to bind to the given function
fun
a function to be bound to a lookup of the specified property

Description

The __defineGetter__ allows a getter to be defined on a pre-existing object.

Tags (2)

Edit tags

Attachments (0)

 

Attach file