Questions tagged [object.observe]

Object.observe() is a proposed mechanism for bringing true data-binding to the browser. It exposes a mechanism for observing changes to objects and arrays, notifying others of mutations made to these objects.

47 questions
3
votes
1 answer

Python: Get single signal from ipywidgets.observe() rather than 3

Essentially, I am creating a number of Toggle Buttons using ipywidgets. When the button is clicked, I would like to add an element to a list. If the button is unclicked, the element is to be removed. (I have not gotten to the action yet) For the…
3
votes
1 answer

Object.observe remove in chrome 50

I had a warning message in Chrome, this one notice that Object.observe method is deprecated and will be removed in Chrome 50 around April 2016. Have you an alternative solution to replace Object.observe ? Thanks
03t02
  • 161
  • 2
  • 3
  • 10
3
votes
1 answer

How to use Object.observe on Map?

How to use Object.observe on Map? This doesn't work: var map = new Map(); Object.observe(map, function() { console.log("ok"); }); map.set('key', 'value'); And this too: var map = new Map(); Array.observe(map, function() { console.log("ok");…
monkey
  • 1,099
  • 13
  • 15
3
votes
1 answer

How to use Object.deliverChangeRecords method in javascript

I understand how to use Object.observe(), and Object.getNotifier(obj).notify or Object.getNotifier(obj).performChange, but how do I use Object.deliverChangeRecords()
Edwin Reynoso
  • 1,413
  • 7
  • 18
2
votes
0 answers

Proxies don't really replace Object.observe (do they?)

Javascript proxies are supposed to be the "more general" replacement for Object.observe, but one nice thing about Object.observe was that it let you monitor unintended changes. It could be used as a convenience method for debugging legacy code, for…
rswerve
  • 119
  • 2
  • 6
1
vote
1 answer

IntersectionObserver.observe is not an object, how to use IntersectionObserver

I am creating a table with sticky columns using css position: sticky. I want to style the columns differently when they are "stuck". My first project involves styling the first column or .wdtscroll td:nth-child(1) when the second column partially…
1
vote
2 answers

What is the alternative of Object.observe as it is already been deprecated

As O.o is already been deprecated what are the other options we have to observe the properties of a Javascript Object.
Ashutosh
  • 49
  • 1
  • 6
1
vote
1 answer

Get notified of reference changes in JavaScript

Is there a way to be notified of a reference change? I feel I need to be clear about what I mean: var a = { aa: 1 }; a = { aa: "allowed" }; // `a`'s reference was modified a.aa = "foo"; // `a` was mutated, but the reference was not modified. Don't…
SimplGy
  • 18,875
  • 14
  • 95
  • 138
1
vote
1 answer

How to change value of an observed object without triggering it's observers

The question is pretty simple but seems like this is impossible with the current implementation of Object.observe. Imagine : var obj = { foo: 1 } Object.observe(obj, function (changes) { console.log(changes) }) obj.foo = 2 This will log an…
Jeremy Knees
  • 640
  • 1
  • 7
  • 18
1
vote
0 answers

How to display JS object property in HTML element and update HTML as soon as attribute/property changes

Currently I am writing an application that consists of hundreds of JS objects asynchronously being updated in the background. Multiple panels, created with iframes can be used to visualize the various objects in HTML. The challenge: as soon as an…
1
vote
0 answers

Object.getNotifier() part of Polymer webcomponents polyfill?

I have a Polymer app that runs in Chrome, but in Firefox and Safari I get the error TypeError: Object.getNotifier is not a function I included the webcomponents.min.js polyfill library (which includes observe-js), which I thought polyfilled this…
1
vote
2 answers

Object.observe on document.location

I need to execute a js script when the hash of the page changes, I know there are many ways to know when the hash changes like using jQuery $(window).on('hashchange', function() { // do something }); I tried to use the Object.observe but it…
Khalid
  • 4,392
  • 5
  • 23
  • 50
1
vote
0 answers

What function change my object (using Object.observe to get this info)

Since some time I research Object.observe function and wonder if it is possible to use it as 'a watcher' that help me to find function (with stack trace) that was the originator of the change. See code fragment below: jQuery(function() { var…
1
vote
1 answer

JavaScript Object.Observe delegation

I have JavaScript array which is consists of many objects. var array=[{name:1},{name:2}.....] I want to use Object.observe to handle data changes on each of these objects. Is there any way to apply something like event delegation here , in order…
Taron Mehrabyan
  • 2,079
  • 2
  • 18
  • 22
1
vote
1 answer

Object.observe instead of dirty checking with AngularJS 1.x

Is there a way to use Object.observe instead of the dirty checking in AngularJS 1.x, if supported by the browser? This could significantly increase the performance. Object.observe is currently supported at least by Google Chrome:…