87
JavaScripthand handler.set() Method
The handler.set method is an assignment of a value to a property value. The set can be iterator in the insertion order. It is a collection of items which are unique. If an assignment succeeded, then return true. Otherwise, returns false.
An Iterator is an object which defines a sequence and potentially a return value upon its termination.
Syntax
Parameters
target: The target object.
property: Name or Symbol of the property.
value: New value of the property.
receiver: This is usually the proxy itself. A set handler assignment indirectly, via the prototype chain or various other ways.
Return value
Return a Boolean value.
Browser Support
Chrome | 49 |
Edge | 12 |
Firefox | 18 |
Opera | 36 |
Example 1
Output:
a= 1 b= 2 c= 30
Example 2
Output:
in set PROXY METHOD
Example 3
Output:
false property set: a = 10
Next TopicJavaScript handler