The development ECMAScript 2016 has already started. One of the coming new capabilities will allow us to bind a function to specific object in order to be notified of changes that take place in that object. This capability is already supported in Google Chrome!

This following code sample shows this capability in action. You can check it out by running this code sample in Google Chrome and check the console.

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
        function observer(changes) {
            console.log("### inside observer ###");
                        console.log(change.type,, change.oldValue);

        var ob = new Object(); = 12321; = "david";
        ob.average = 87;


        ob.average = 90; = "david dahan";


        ob.average = 92; = "david dahan junior";
        ob.average = 90;

        Object.deliverChangeRecords(observer); = 123123123;



        ob.average = 100;



The following video clip overviews the execution of this code sample and explains it step by step. I strongly believe it will assist you with understanding this topic.

Leave a Reply

Your email address will not be published. Required fields are marked *