- Notifications
You must be signed in to change notification settings - Fork 128
/
Copy pathaccessor-methods.yml
16 lines (16 loc) · 968 Bytes
/
accessor-methods.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
name: Accessor methods
description: The `__defineGetter__()` and `__defineSetter__()` methods of objects bind a function to a property, which is called on setting or reading the property.
spec: https://tc39.es/ecma262/multipage/fundamental-objects.html#sec-object.prototype-legacy-accessor-methods
discouraged:
according_to:
- https://tc39.es/ecma262/multipage/additional-ecmascript-features-for-web-browsers.html#sec-additional-ecmascript-features-for-web-browsers
# No `alternatives` because it would be `alternatives:
# [object-object, functions]`. In the future it'd be nice to have an
# internal reference to the object defineProperty method and the function
# get/set syntax.
# See: https://github.com/web-platform-dx/web-features/issues/2676
compat_features:
- javascript.builtins.Object.defineGetter
- javascript.builtins.Object.defineSetter
- javascript.builtins.Object.lookupGetter
- javascript.builtins.Object.lookupSetter