Riot JS - DOM Events

InstructorTim Kindberg

Share this video with your friends

Send Tweet

Riot can listen for raw dom events on any element by adding the on* attribute to elements and referencing an event handler. Let's walk through a couple examples.

Gabriel Kohen
~ 9 years ago

Great intro Tim. I think the options lesson should be second in the playlist rather than third but I might have it wrong.

Prabu
~ 9 years ago

Also, you can refer to a tag by name. For example, if you had multiple trim tags, you could refer a particular trim tag by assigning name="trim1" on the tag and then referrring it by self.tags.trim1