Set attributes on the current active tag context
(*args, **kwargs)
| 492 | |
| 493 | |
| 494 | def attr(*args, **kwargs): |
| 495 | ''' |
| 496 | Set attributes on the current active tag context |
| 497 | ''' |
| 498 | c = get_current() |
| 499 | dicts = args + (kwargs,) |
| 500 | for d in dicts: |
| 501 | for attr, value in d.items(): |
| 502 | c.set_attribute(*dom_tag.clean_pair(attr, value)) |
| 503 | |
| 504 | |
| 505 | from . import util |