Add a `_new_{prop_name}()` method to the element class. This method creates a new, empty element of the correct type, having no attributes.
(self)
| 309 | self._add_to_class(self._add_method_name, _add_child) |
| 310 | |
| 311 | def _add_creator(self): |
| 312 | """Add a `_new_{prop_name}()` method to the element class. |
| 313 | |
| 314 | This method creates a new, empty element of the correct type, having no attributes. |
| 315 | """ |
| 316 | creator = self._creator |
| 317 | creator.__doc__ = ( |
| 318 | 'Return a "loose", newly created ``<%s>`` element having no attri' |
| 319 | "butes, text, or children." % self._nsptagname |
| 320 | ) |
| 321 | self._add_to_class(self._new_method_name, creator) |
| 322 | |
| 323 | def _add_getter(self): |
| 324 | """Add a read-only `{prop_name}` property to the parent element class. |
no test coverage detected