Evaluate bindings in shadow dom
ThatScalaGuy opened this issue · comments
Sven commented
Hi,
I am wondering if it is possible to evaluate the bindings when using a shadow dom.
The attached fiddle shows what I want to achieve.
http://jsfiddle.net/wmoL2v81/13/
Or is this not possible with slim.js
Avichay Eyal commented
Basically, it is possible, adding a slim plugin.
Something like
Slim.plugin('create', (element) => {
const children = Array.from(element.children);
requestAnimationFrame( () => {
element._bindChildren(children);
element.commit();
});
});
If you want to restrict for specific elements, in the plugin function filter the elements by their localName... if (element.localName === 'my-custom-tag') ...
Will that work for you?
Sven commented
Did not see your replay. I will check your recommendation next week. Thx so far.