Closed Danny-Engelman closed 7 years ago
As someone who uses both Cell and Polymer, I might be able to help here. There are some similarities, certainly, but there are also some crucial differences. Those include:
document.registerElement
, and then the component is instantiated when the appropriate tag is parsed in the DOM. With Cell, all of the work happens once on load (except for if $update
gets called). This means that dynamically added elements won't be cells by default, whereas dynamically added web components work just fine.$update
and a simple diff algorithm to make minimal DOM changes when you regenerate subcomponents, and lets you deal with all the rest using pure JavaScript.oh, many thanks @Caffeinix, what you say is also my care. and more options? @gliechtenstein
Thanks for the great explanation @Caffeinix
I think he covered most of the details, so will just go ahead and add a bit of my own comments.
p.s.
Just a quick comment on this:
With Cell, all of the work happens once on load (except for if $update gets called). This means that dynamically added elements won't be cells by default, whereas dynamically added web components work just fine.
Now Cell started supporting manual instantiation https://github.com/intercellular/cell/issues/125 and I plan to make it even more flexible so Cell can be easily integrated into any context.
thank @Danny-Engelman for your ask my question. thank @Caffeinix and @gliechtenstein for your professional answers. thank all again.
Can you list the differences with (almost) native Browser WebComponents?
Seems to me (at the moment) you created a very lightweight Polymer.