CodesJava

Easy learning with example program codes

JavaScript isExtensible() method

The Javascript handler isExtensible() method traps for Object.isExtensible(). It is commonly used for logging or auditing calls.

Syntax:

isExtensible: function(target)

Parameters:
target: It represents the target object.

Return:
Boolean.

Example:

<!DOCTYPE html>
<html>
<body>
<script>
const handler={ too:1 }  
const  extent = new Proxy(handler, {  
  isExtensible: function(a) {  
	document.writeln('HELLO WORLD! : ');  
	return true;  
  }});  
document.writeln(Object.isExtensible(extent));  
</script>
</body>
</html>

Output:

HELLO WORLD! : true
Please follow and like us:
error








Copyright © 2019 CodesJava DMCA.com Protection Status