Hi
If am creating a tree that includes a webcomponent which updates on attributeChangedCallback. However, through hyperx, all specified attributes end up being passed to virtual-dom as props, because attributes need to be all passed together within an attributes sub-object.
Currently with a view like below:
return html `<my-web-component class="${className}"
data-src="${src}"
style="display:flex;width:${width}px;height:${height}px">
</my-web-component>`
...all the three attributes end up being assigned directly to the DOM element rather than via setAttribute.
I realize this is perhaps because virtual-dom does not adhere to the hyperscript API (as specified, h(tagName, attrs, children), when virtual-dom actually takes h(tagName, props ={attributes: {} }, children)). But if hyperx shouldn't be expected to account for these differences, then the documentation should probably be updated to let people know it won't work as expected with virtual-dom specifically and save some time :) Thanks!
Hi
If am creating a tree that includes a webcomponent which updates on
attributeChangedCallback. However, throughhyperx, all specified attributes end up being passed tovirtual-domas props, because attributes need to be all passed together within anattributessub-object.Currently with a view like below:
...all the three attributes end up being assigned directly to the DOM element rather than via
setAttribute.I realize this is perhaps because
virtual-domdoes not adhere to the hyperscript API (as specified,h(tagName, attrs, children), whenvirtual-domactually takesh(tagName, props ={attributes: {} }, children)). But ifhyperxshouldn't be expected to account for these differences, then the documentation should probably be updated to let people know it won't work as expected withvirtual-domspecifically and save some time :) Thanks!