Et2Widget: 'attributes' is read-only in webcomponent, so assign it in to avoid errors

This is used by some kanban column stuff
This commit is contained in:
nathan 2022-08-15 10:35:12 -06:00
parent ddee9a2b59
commit 652e84644b

View File

@ -1352,6 +1352,16 @@ function transformAttributes(widget, mgr : et2_arrayMgr, attributes)
// Special case attributes // Special case attributes
if(attributes.attributes)
{
// Attributes in content? "attributes" is read-only in webComponent
let mgr_attributes = mgr.getEntry(attributes.attributes);
delete attributes.attributes;
if(mgr_attributes)
{
Object.assign(attributes, ...mgr_attributes);
}
}
if(attributes.width) if(attributes.width)
{ {
widget.style.setProperty("width", attributes.width); widget.style.setProperty("width", attributes.width);