Home » JavaScript handler construct() Method

JavaScript handler construct() Method

by Online Tutorials Library

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

You may also like