pburrows / rangy-updated

A clone of timdown/rangy that accepts additional contributors and pull requests.
MIT License
39 stars 5 forks source link

Get latest selection element #4

Open gbelvedere opened 5 years ago

gbelvedere commented 5 years ago

Hi, when I create a selection and then highligh it, it adds some elements, any idea on how to retrieve those elements immediately after their creation?

pburrows commented 5 years ago

I usually add an additional decorator (a class) to those elements after they are created, so to find new ones, I just search for ones without that decorator. Perhaps not the best method, but it works pretty seamlessly for me.