Skip to content
This repository was archived by the owner on Aug 28, 2024. It is now read-only.

Commit eba7e00

Browse files
committed
XmlComponent: don't allow attributes on properties
1 parent 0aa26df commit eba7e00

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/com/feathersui/xml/XmlComponent.hx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,13 @@ class XmlComponent {
379379
continue;
380380
}
381381

382+
for (attribute in child.attributes()) {
383+
if (attribute == "id") {
384+
continue;
385+
}
386+
var attrPos = xmlDocument.getAttrPosition(child, attribute);
387+
errorAtXmlPosition('Unknown field \'${attribute}\'', attrPos);
388+
}
382389
var fieldType = foundField != null ? foundField.type : null;
383390
parseChildrenForField(child, child.iterator(), targetIdentifier, foundField, childXmlName.localName, fieldType, prefixMap, parentFields,
384391
initExprs, xmlDocument);

0 commit comments

Comments
 (0)