-
Notifications
You must be signed in to change notification settings - Fork 46
Description
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!