2-way data binding in native web components

I read on web components and am quite intrigued by the nascent specification. Does anyone know if there is support for two-way data binding in the DOM without using Polymer? An example will be appreciated.

+8
html5 2-way-object-databinding web-component
source share
2 answers

No, data binding is not part of the web component specification.

You can, of course, implement data binding using your own JavaScript event listeners and possibly Proxy , but it's probably best not to reinvent the wheel: if you want to bind data, choose one of the many JavaScript frameworks that supports this. Polymer, React, Angular, and Vue are some recent examples of such libraries.

+1
source share

Object.observe is a potential new way to create data bindings in javascript. This feature is planned for Ecmascript 7 (javascript), but some browsers currently support it, check here . Also check this html5rocks article on object.observe

+3
source share

All Articles