Javatpoint Logo
Javatpoint Logo

JavaScript handler.construct() Method

The handler.construct() method is used to intercept the new operation. This method returns an object.

Syntax

Parameters

Target: The target object.

argumentsList: List of the constructor.

newTarget: The constructor that was originally called, p above.

Return value

This method returns an object.

Browser Support

Chrome 49
Edge 12
Firefox 18
Opera 36

Example 1

Test it Now

Output:

Java Script proxy Constructor

Example 2

Test it Now

Output:

{ "Value": "Hello to anybody" } 

Example 3

Test it Now

Output:

Constructor called Proxi

Next TopicJavaScript handler





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA