Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Observe callback being triggered for the changes made before Object.observe #16

Closed
miyconst opened this issue Oct 13, 2015 · 1 comment
Labels

Comments

@miyconst
Copy link

Code snippet to test:

var obj = {};
var callback1 = function () {
};
var callback2 = function () {
    throw "this callback should not be called as it was attached after the changes were made";
};

obj.value1 = "value 1";
Object.observe(obj, callback1);

obj.value2 = "value 2";
Object.observe(obj, callback2);

Note: the code works correct under npm, but fails in IE and Firefox.

@MaxArt2501
Copy link
Owner

Nice catch, I'll look into it later.

@MaxArt2501 MaxArt2501 added the bug label Oct 13, 2015
@miyconst miyconst mentioned this issue Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants