(element, attr)
| 949 | |
| 950 | |
| 951 | def _set_attribute_node(element, attr): |
| 952 | _clear_id_cache(element) |
| 953 | element._ensure_attributes() |
| 954 | element._attrs[attr.name] = attr |
| 955 | element._attrsNS[(attr.namespaceURI, attr.localName)] = attr |
| 956 | |
| 957 | # This creates a circular reference, but Element.unlink() |
| 958 | # breaks the cycle since the references to the attribute |
| 959 | # dictionaries are tossed. |
| 960 | attr.ownerElement = element |
| 961 | |
| 962 | class Childless: |
| 963 | """Mixin that makes childless-ness easy to implement and avoids |
no test coverage detected
searching dependent graphs…