brandizzi / golem

https://bitbucket.org/brandizzi/golem/wiki/Home
0 stars 0 forks source link

Create the take method #6

Open brandizzi opened 9 years ago

brandizzi commented 9 years ago

Original report by Adam Victor Brandizzi (Bitbucket: brandizzi, GitHub: brandizzi).


Instead of the current fill() method, or as an alternative to it, we should have a take() method that returns a representaiton of the element.

e = animator.take(selector='.message')

The returned element would have a fill method:

e.fill('My message')

...and maybe also an insert() method to repeat itself:

e = animator.take(selector='ul.list li')
for i in items:
    e.insert(i)

In principle, a taken element will not be present in the end result if it is not filled or inserted.