Sometimes, my some part of my structured data changes underneath me inside
a Javascript library I can't control. The library does not tell me what the
changes are, just that something did happen.
I'd like to use data binding mechanism to notify other elements about these
changes. Calling this.set() does not propagate the changes, because the
value is still the same. What call can I f
Concrete example:
- DataSource: js library that analyzes getUserMedia stream, and calls
`callback(eventArray)` when new event happens. eventArray variable is
always the same object, to which new events get appended, or old events
deleted.
- Polymer({
is: data-source-wrapper,
properties: { events: { type: Array, notify: true } },
start: function() {
dataSource.listen( function(events) {
this.events = events; // I'd like to force event change
notification here, bc does not broadcast when events === this.events
}
})
- <dom-module id='event-viewer'>
<template>
<data-source-wrapper events="{{events}}">
<template>
</dom-module>
Polymer( {
observers: {
'events.*', 'eventsChanged'
}
})
How to I force trigger of event-viewer.eventsChanged when dataSource
reports a new event?
Aleks
Follow Polymer on Google+: plus.google.com/107187849809354688692
---
You received this message because you are subscribed to the Google Groups
"Polymer" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/polymer-dev/cb3d3fc7-0a18-4b6e-885d-6858f46dd011%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.